Excel: Check if column A has a specific value, if so, display another cell within the row where the value is located

microsoft excel

How would I be able to write a formula that checks if column A has a specific value, and if so, displays another cell within the row where the value is located. From the example below, I want to find out if "Josh Doe" is on column A, and if "Josh Doe" is on column A, I want to display what the cell next to it reads (or another specific cell within that row, perhaps guided by column).

Here's an example:

http://i.stack.imgur.com/ih1vd.png

=SUMIF(A:A, “Josh Doe”,B:B) would allow me to add values associated with Josh Doe found on column B.

Is there a similar function that would allow me to reference the text belonging to "Josh Doe" on column B?

Best Answer

I think the function you're looking for is VLOOKUP. It's a hard function to wrap your head around, but very useful, and it should do what you need. If the value you're looking for isn't in Column A, it will either return the "closest" match or "N/A" depending on what you put in the last argument.

So I think you want =VLOOKUP("John Doe",A:B,2,FALSE)

Related Question