Excel - Check if date is greater in 2 columns

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
950
Office Version
  1. 2019
Platform
  1. Windows
I have two columns with dates. Is it possible to check (with a single formula) that for each row, the date entered in column 2 is always greater than the date entered in column 1?

many thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Try something like this:
Code:
<b1:b100))>=IF(SUMPRODUCT(--(B1:B4 < A1:A4))>0,"Values exist in column A greater than in column B","")
</b1:b100))>
 
Last edited:
Upvote 0
ok this works but if the date is left blank it also gives an error... is there a way to skip blank cells ?
 
Last edited:
Upvote 0
Which columns would the blanks appear in?
If there are any blanks, do you want to skip the whole function, or just the check in that row?
 
Upvote 0
so the second column could be blank or not... the first column always has a date... if both columns are blank then the check should be skipped for that row... essentially i am checking if the disposal date is greater than the purchase date.. the disposal date naturally should always be greater than the purchase date :)
 
Upvote 0
Try this:
Code:
=IF(SUMPRODUCT(--(B1:B4 < A1:A4),--(B1:B4 > 0))>0,"Values exist in column A greater than in column B","")
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,438
Members
448,897
Latest member
dukenia71

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