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.
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

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
10,693
Office Version
2019
Platform
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
10,693
Office Version
2019
Platform
Windows
I doubt it will be quite so simple, but from a second read of your post this looks possible.

=IF(X1,Index etc,"")
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,693
Messages
5,512,912
Members
408,920
Latest member
KLH81

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top