I want make a formula which includes text and the output will be a different text also.
Like:
G8 = I am Red,
G9 = I am Green,
G10 = I am White.
Now, I need a formula which will give output like:
"Red" (in H8 field) when I enter “I am Red” and so on for other inputs.
I have tried with ‘nested if’, but only 7 nested if can be added, whereas I have at least 40+ values to input and need to get different output for those input.
Assuming your data is in column G starting G8, do the following:
=RIGHT(G8,LEN(G8)-MAX(IF(MID(G8,ROW(INDIRECT("1:"&LEN(G8))),1)=" ",ROW(INDIRECT("1:"&LEN(G8))),0))).{}brackets around it (but do NOT type them manually!).It will return the last “word” in a string, or more exactly – part of string between the last space and its end, regardless of actual symbols.
Sample file: https://www.dropbox.com/s/dfkk1cqy1z0o3pz/ColorName.xlsx