Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Excel formula to check a text value from a cell against table's first column and return a value from the table second column

excel formula: Formula in column B (cell B1, B2, …) must check if a word from C1:C4 is used in A1 and return a corresponding value from D1:D4.

In result, the column B should look like below. This is an example of input data and results in the column B.

A B C D
Go 2 steps M Jump J
Turn left T Go M
Jump fence J Turn T
Run forward M Run M
Turn around T
Go 5 steps M

I have done that some time ago using INDEX, MATCH AND VLOOKUP or HLOOKUP but can’t find it any-more. I remember that it took me long time to make it work. If a cell in column A is empty, corresponding cell in column B stays clear.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use the LOOKUP() function to accomplish the desired output in column B

enter image description here

• Formula used in cell B1

=LOOKUP(2,1/(SEARCH($C$1:$C$4,A1)),$D$1:$D$4)

And Fill Down for the rest of the cells.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading