Urgent Help Required

geor68

New Member
Joined
Mar 24, 2011
Messages
18
Hi,

I have an excel spreadsheet that involves a rather large formula that uses IF VLOOKUP it returns False in the cell when no data has been entered in another cell. I now need to use the function ISNA to make the cell blank - the formula is now even larger and syntactically incorrect. Can someone please help me correct it. The formula in English is If X1="A" then lookup X1 in the range R2:T30, if X1="B" then lookup X1 in the range U2:W30, if X1="C" then lookup X1 in the range Y2:AA30. I've got this to work. How do I add the ISNA fuction? Any help would be gratly appreciated.

Regards

geor68
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Welcome to the board...

I'm thinking an even better way to do it...
However, please post your actual formula, because my idea will need specifics, not generalizations and simplified example "psudo-code"
 
Upvote 0
However, 1 way to simplify it using only "psudo-code" is to use just one vlookup...

instead of
=IF(A1="X",VLOOKUP(value, range1,2,0),IF(A1="Y",VLOOKUP(value, range2,2,0)..etc..

do

=VLOOKUP(value,IF(A1="X",Range1,IF(A1="Y",Range2)),2,0)

Then wrap it in an ISNA

=IF(ISNA(VLOOKUP(value,IF(A1="X",Range1,IF(A1="Y",Range2)),2,0)),"",VLOOKUP(value,IF(A1="X",Range1,IF(A1="Y",Range2)),2,0))
 
Last edited:
Upvote 0
Try this a shot,

=VLOOKUP(Value,CHOOSE(MATCH(A1,{"X","Y","Z"},0),Range1,Range2,Range3),2,FALSE)
 
Upvote 0
MrRajKumar - cheers for the solution. Whats the correct syntax for wrapping an ISNA command round that?
 
Upvote 0
Try these,

If your, VLOOKUP out put is Number;

=LOOKUP(1E+307,CHOOSE({1,2},0,VLOOKUP(Value,CHOOSE(MATCH(A1,{"X","Y","Z"},0),Range1,Range2,Range3),2,FALSE)))

If it is text;

=LOOKUP(REPT("Z",250),CHOOSE({1,2},"",VLOOKUP(Value,CHOOSE(MATCH(A1,{"X","Y","Z"},0),Range1,Range2,Range3),2,FALSE)))

Raj
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,315
Members
448,886
Latest member
GBCTeacher

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top