If Then Statement with Dates and Vlookup

cmschmitz24

Board Regular
Joined
Jan 27, 2017
Messages
150
I have a date being vlookup'd into column H from a different spreadsheet and then I need to determine if that date is greater than or less than 04/01/21 in column J. If it's older than 04/01/21, I need to have column J return 04/01/21. If it's newer than 04/01/21 then I need to have column J return the date vlookup'd into column H. My formulas are not calculating correctly. Please help.

The formula I have in column J is: =IF(H2>DATEVALUE("04/01/2021"),H2,"04/01/2021")

However, it works for the first row, the next rows are not returning the correct date wanted. Here's an example of what I'm getting -

1622831442377.png


row 2, column J should return 06/01/2021
rows 3-5, column J should return 04/01/2021
 

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.
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,731
Messages
6,126,532
Members
449,316
Latest member
sravya

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