• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Return different result based on cell contents?

If I use index match to refer to column A, how can I return column B if there is a value in column B, but return column C if there is no value in column B?



Well-Known Member
Loads of ways, among them:
in pre Office365 (long winded):
This might work pre Office365 (I can't test) but may need to be array-entered (Ctrl+Shift+Enter rather than just Enter when committing the formula to the sheet):
In Offices365:
Pre Office365 without index/match:
where G10 contains what you're looking up.
I'm sure there'll be more elegant ways.


Last edited:
I'm using Excel 2007.
Thanks for your tips. i notice there is one variable I forgot to mention.
G10 (my lookup) can be a value in either column A or B.
If it is a value in column B, I want to return C.
If it is a value in column A, I want to return Column B, unless Column B is empty, then I want to return Column C.


Well-Known Member
Not sure if I've got the logic right, so check: