Excel - Check if date is greater in 2 columns

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
926
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
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,650
Office Version
365
Platform
Windows
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:

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
926
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:

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,650
Office Version
365
Platform
Windows
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?
 

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
926
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 :)
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,650
Office Version
365
Platform
Windows
Try this:
Code:
=IF(SUMPRODUCT(--(B1:B4 < A1:A4),--(B1:B4 > 0))>0,"Values exist in column A greater than in column B","")
 

Watch MrExcel Video

Forum statistics

Threads
1,102,335
Messages
5,486,233
Members
407,538
Latest member
kbendelac

This Week's Hot Topics

Top