incorporate date in IF/VLookup

eyjie

New Member
Joined
Apr 17, 2019
Messages
3
Hi there,
I have a formula below that is working great so far. However, I wanted to add a date reference to it.

For example if D1="03/29/19"....then apply the current formula below, if not just ""
=IF(ISNA(VLOOKUP($B4,MARCH,10,FALSE))=FALSE,"NO","YES")

It is not doing what I wanted to accomplish though, just giving me blank, or error message to revise my formula.

Thank you in advance for your help.

eyjie
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the Board!

Try:
Code:
[COLOR=#333333]=IF(D1=DATE(2019,3,29),IF(ISNA(VLOOKUP($B4,MARCH,10,FALSE))=FALSE,"NO","YES"),"")
[/COLOR]
or
Code:
[COLOR=#333333]=IF(D1=DATEVALUE("3/29/2019"),IF(ISNA(VLOOKUP($B4,MARCH,10,FALSE))=FALSE,"NO","YES"),"")
[/COLOR]
 
Last edited:
Upvote 0
Dear Joe4,

Thank you so much. What seemed to be so hard for me, looked like so easy for you...it worked!!!! I appreciate your quick and definitely helpful response.

Regards,
eyjie
 
Upvote 0
You are welcome.

The key is in how you present the date. The following will not work:
=IF(D1="3/29/2019",...
because anything enclosed in double-quotes is treated as Text, not as a Date.
So you need to do something to tell it is is date (by using the Date or DateValue functions).
 
Upvote 0
Thank you, these are great recommendations in how to use excel functions.
I have a follow up question please, since the data is growing on a daily basis, I would like to include the date as part of the vlookup reference table as another look up column, or I can create a separate date table vlooup reference if needed; if so, how can that function replace the date requirements in the formula. Thank you again. I appreciate your help.

Regards,
eyjie
 
Upvote 0
I am not sure I understand what you are asking now.
Can you walk us through an actual example?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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