[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
Solved

# Comparing dates

Posted on 2012-04-13
Medium Priority
161 Views
Excel 2003.  I have two cells with dates A1, B1

I'm trying to compare the dates with results in cell C1 using:

=IF(A1>B1,"A","B")

However my results are always "A".  I've tried the date in mm/dd/yyyy and mm-dd-yyyy with no change in the results.

I believe I have compared dates like this before.  In ideas why this is not working?

Thank you.
0
Question by:thandel
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2
• 2
• 2

LVL 43

Expert Comment

ID: 37843195
It should work. Maybe the dates are just text.

Can you upload a sample file?
0

Author Comment

ID: 37843203
OK here is the file, pretty straight forward.  I'm pulling my hair out.
Dates.xls
0

LVL 43

Accepted Solution

Saqib Husain, Syed earned 2000 total points
ID: 37843206
Try

=IF(A1>A2,"A","B")
0

Author Comment

ID: 37843262
Oh you mean if I acutally refer to the correct cells it might work?!?!

LOL!!!! Thanks I need more coffee.
0

LVL 7

Expert Comment

ID: 37843270
My dear chandel,
What you dis was, your data was in A1 and A2 cell instead of A1 and B1 cell.
Use formula
=IF(A1>A2,"A","B")

from
KArunamoorthy
0

LVL 7

Expert Comment

ID: 37843273
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
###### Suggested Courses
Course of the Month13 days, 13 hours left to enroll