Articles

Comparing Dates in Excel

May 5, 2009 at 02:59:57
Specs: Windows XP

Hi,

Please help me in comparing dates in Excel.
Let the cells have dates as given below...
A2 = 10-Jan-2009
B2 = 20-Feb-2009
C2 = 30-Mar-2009.

I need a formula that checks if C2 is equal to any of the dates given in A2 or B2.

I tried with this and got an error but could not get it right... :(
=IF(C2= A2 OR B2, "Equal", "Not Equal")


See More: Comparing Dates in Excel

Report •


#1
May 5, 2009 at 06:38:26

Try This:

1st - Highlight Column Data Cells
I.E. Cells A1 thru A100

On the Menu Bar:

2nd - Format
3rd - Conditional Formatting
4th – Change “Cell Value is” to “Formula Is”
5th – Enter the formula:

=COUNTIF($A$1:$A$100,A1)>1

Sub Menu Format :
6th - Patterns
7th - Choose a pretty color
8th - Press OK
9th - Press OK

Duplicate records should now be highlighted in your selected pretty color.

Too go along rows up to the letter D use this:

1st - Highlight Column Data Cells
I.E. Cells A1 thru D1

change formula to:

=COUNTIF($A$1:$D$1,A1)>1

MIKE

http://www.skeptic.com/


Report •

#2
May 5, 2009 at 07:02:42

=IF(OR(C2=A2,C2=B2),"Equal","Not Equal")

If C2 equals A2 or if C2 equals B2 then Equal, else Not Equal.

Bryan


Report •

Related Solutions


Ask Question