Problem with a formula

KnAsTa

Board Regular
Joined
Apr 11, 2002
Messages
52
Ok, right now this formula only works for the first half: (it is looking for several values in an external spreadsheet and returning the correct values. either 3 or 0)

=IF(ISERROR(LOOKUP(A5,week1.xls!$A$1:$A$10,0)),IF(VLOOKUP(A5,week1.xls!$A$1:$D$10,3,0)>VLOOKUP(A5,week1.xls!$A$1:$D$10,4,0),3,0),

The second part of this formula however, doesnt work. It is returning #N/A where it should be returning another set of 3's and 0's. I had some help before on this from Ian (thanks for that) but what i used from his explination helped, but it still doesnt work. :(

IF(ISNA(LOOKUP(A5,week1.xls!$A$1:$D$10,4)>VLOOKUP(A5,week1.xls!$A$1:$D$10,3,0)),3,0))

So if anyone can find the problem with this code, it would be greatly appreciated. Thanks a lot :)
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
With the addition of a ) at the end,
and revision of the first part of your formula, it looks OK. The brackets are incorrect at the end of the first part.

Revise the references to fit your information.

=IF(ISERROR(LOOKUP(B1,$A$2:$A$10)),"",IF(VLOOKUP(B1,$A$2:$D$10,3,0)>VLOOKUP(B1,$A$2:$D$10,4,0),3,0))

Note. With the above, if there is no value to lookup, the formula shows a blank "".

Check each part of the formula and the data to isolate the error.

Another approach is to add another column to the lookup table with =C3-D3

The formula could then be

=(VLOOKUP(B1,A1:E10,5)>0)*3

Or put all the calculations on the Lookup Table and the formula could be

=VLOOKUP(B1,A1:F10,6)<
This message was edited by Dave Patton on 2002-04-13 07:52
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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