ISNA Problem with Formula

MrData

Active Member
Joined
May 4, 2003
Messages
324
I currently have a lookup formula =IF(MID(VLOOKUP($A$2,Summary,($C6),FALSE),3,3)="Air",VLOOKUP($A$2,Summary,($C6),FALSE),"") which shows #n/a on occasions. I know that if I use ISNA somewhere this should just show a blank cell if no match is found.

Can someone please advise where ISNA should be placed in the above formula, as all I do is get a blank cell where a result should be shown.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
MrData said:
I currently have a lookup formula =IF(MID(VLOOKUP($A$2,Summary,($C6),FALSE),3,3)="Air",VLOOKUP($A$2,Summary,($C6),FALSE),"") which shows #n/a on occasions. I know that if I use ISNA somewhere this should just show a blank cell if no match is found.

Can someone please advise where ISNA should be placed in the above formula, as all I do is get a blank cell where a result should be shown.

=if(isna(IF(MID(VLOOKUP($A$2,Summary,($C6),FALSE),3,3)="Air",VLOOKUP($A$2,Summary,($C6),FALSE),"")),"",IF(MID(VLOOKUP($A$2,Summary,($C6),FALSE),3,3)="Air",VLOOKUP($A$2,Summary,($C6),FALSE),""))

Should do the job.
 

MrData

Active Member
Joined
May 4, 2003
Messages
324
Thanks, that's worked. Would never have thought of adding an extra IF statement.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
An efficient way with Morefunc...

=IF(ISNUMBER(--(MID(SETV(VLOOKUP($A$2,Summary,$C6,0)),3,3)="Air"),GETV(),"")
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,037
Messages
5,856,966
Members
431,841
Latest member
jaybeem

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
Top