View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Finding the solution to an Exel problem.

MJohn wrote:
My scenario is as follows: I have 2 adjacent cells that have 'VLOOKUP'
functions and they return a value when certain criteria are met. There are
only 4 value scenarios that can occur. 1) Both cells have no response and a
'#N/A' is displayed in each cell. 2) Both cells have the same response,
(ie:'XT25' & 'XT25'). 3) The first cell has a response, (ie:'XT25') and the
second cell displays '#N/A'. 4) The first cell displays '#N/A' and the
second cell has a response, (ie:'XT25'). What I would like to do is simply
display any response other than '#N/A' only once in a third cell. In this
case, other than the 1st scenario ( both cells w/ '#N/A'), I would want
'XT25' displayed in the cell by itself (just 'XT25', not 'XT25,XT25' or
'XT25,#N/A'). I've exhausted my thoughts with 'IF', 'OR', and 'CONCATENATE'
functions and have failed. I keep getting 'Value' error responses. Is the
'#N/A' error the root of my problems when it is displayed. Even before a
condition occurs, '#N/A' is being displayed in the 2 adjacent cells. It
would seem like there would be an easy answer to this, is there?


MJohn,

Will this work for you?

=IF(ISNA(A1),IF(ISNA(B1),"",B1),A1)

What I'm not sure about is what you want to show if both cells have
values that are different. The above will default to A1.