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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

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