Quick help with IF Statement

golfnut019

Board Regular
Joined
Nov 11, 2005
Messages
58
=IF(ISBLANK(P6574),VLOOKUP(G6574,'HC-CID'!A$2:I$65185,8,FALSE),IF(Q6574>37809,VLOOKUP(G6574,'HC-LID2'!A$2:I$65185,8,FALSE),VLOOKUP(G6574,'HC-LID'!A$2:I$65185,8,FALSE)))


Here's what's going on :

the isblank part is pretty self-explanatory.

I want the formula to check the data, and if it's greater than 12/23/2005, it'll look for the G value in the HC-LID2 sheet and if it's less than or equal 12/23/2005, it'll go to the HC-LID sheet.

I keep getting a #N/A for dates less than or equal to 12/23/2005 although when i manually look up the G value in the HC-LID sheet it's there.

Is there anything fundamentally wrong with the formula?


Thanks
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
To make it easier, if the value in column P is not blank, I run IF(Q6574>37809,VLOOKUP(G6574,'HC-LID2'!A$2:I$65185,8,FALSE),VLOOKUP(G6574,'HC-LID'!A$2:I$65185,8,FALSE))) part of the whole formula.

Do I need parantheses to distinguish this part of the formula as the false part of the first IF statement?

I can't seem to get around this.
 
Upvote 0
Make sure the dates are true dates, that is, numbers. First try to clean up with ASAP Utilities the lookup tables before considering any other possibilities.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

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