IF / ISNA Lookup formula

will31

Board Regular
Joined
May 2, 2010
Messages
140
Hi All,

I have a lookup table with two columns one like this:

Excel Workbook
AB
1YesYes
2NoNo
3N_ANot applicable
Sheet1


And have a dropdown to give the user the option to choose one of the three in column B. I have created a lookup thus;

=IF(ISNA(Index etc),"",Index etc)) to lookup the appropriate value in column A when the value from column B is selected. I wondered if a simpler method would be to try to use boolean logic to avoid the error statement if the cell was blank? If I use (X1<>"")*(Index etc) it returns an error since I guess it is looking for a numerical value.

In addition, could boolean logic return the value for the lookup?

The data from column A is being used in another program and the excel sheet will be used to upload information into this database and needs to be useable in Excel 2003.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

gsbelbin

Active Member
Joined
Aug 29, 2008
Messages
336
Hi All,

I have a lookup table with two columns one like this:

Excel Workbook
AB
1YesYes
2NoNo
3N_ANot applicable
Sheet1


And have a dropdown to give the user the option to choose one of the three in column B. I have created a lookup thus;

=IF(ISNA(Index etc),"",Index etc)) to lookup the appropriate value in column A when the value from column B is selected. I wondered if a simpler method would be to try to use boolean logic to avoid the error statement if the cell was blank? If I use (X1<>"")*(Index etc) it returns an error since I guess it is looking for a numerical value.

In addition, could boolean logic return the value for the lookup?

The data from column A is being used in another program and the excel sheet will be used to upload information into this database and needs to be useable in Excel 2003.

I'm not exactly clear on what you're after but you said you get an error when you use (X1<>"")*(Index etc) because it's looking for a numerical value. You can convert a boolean to a numerical by putting -- in front of it ie --(X1<>""). This will convert a TRUE to 1 and a FALSE to 0.
 

will31

Board Regular
Joined
May 2, 2010
Messages
140
I guess I shouldn't have written the post so late in the evening!!

I am looking for an alternative to ISNA and the lengthy formula I posted. I have tried to use (X1<>"")*(Index etc) but since the values are text and not numbers I get a #value error.

I read on Ozgrid that you can take the Lookup to another cell and use the cell location in the formula to reduce the lookup formula used to calulate the result but wonderted if it could be taken further with an alternative to ISNA.

Is this clearer?
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,761
Office Version
  1. 365
Platform
  1. Windows
If you have a working formula that you just want to make more efficient then try posting the whole formula.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,761
Office Version
  1. 365
Platform
  1. Windows
I doubt it will be quite so simple, but from a second read of your post this looks possible.

=IF(X1,Index etc,"")
 
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,163,398
Messages
5,831,404
Members
430,064
Latest member
Shahrukh kha

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