View Single Post
  #1   Report Post  
 
Posts: n/a
Default combining a Vlookup and Mid formula

Searched the groups but can't find any examples.

The following formula works fine but I want to add a few things.

In cell B3
=IF('Base'!E7="",VLOOKUP($H3,OTIS!$BG:$BJ,4,FALSE) ,VLOOKUP($F3,OTIS!$R:$W,4,FALSE))


On the OTIS worksheet in columns BJ and W, I have cells with A123BC in
them.
I only want to return the MID of the cell.
=MID(BJ1,2,3) is what I want extracted.


Also, If H3 and F3 are both blank, the cell displays #N/A. When I want
the cell to show blank.
I've tried NOT(ISNA and nesting another IF, but just can't get it
right.


So what I'm trying to get is:
if E7="", lookup the mid 3 numbers from OTIS!column BJ, else lookup the
mid 3 numbers from OTIS!column W, and if both H3 and F3 are blank, then
supress the #na and show a blank.