Solved

Comparing dates

Posted on 2012-04-13
6
156 Views
Last Modified: 2012-04-13
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
Comment
Question by:thandel
  • 2
  • 2
  • 2
6 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37843195
It should work. Maybe the dates are just text.

Can you upload a sample file?
0
 

Author Comment

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

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 37843206
Try

=IF(A1>A2,"A","B")
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:thandel
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

by:karunamoorthy
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")
then your comparison will work.

from
KArunamoorthy
0
 
LVL 7

Expert Comment

by:karunamoorthy
ID: 37843273
post your remakrs pl.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question