Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default compare 2 tables of dates to find the preceding dates

I have 2 tables of dates in the format DD-MM-YYYY.I want to compare the 2 set
of dates to find out which dates are preceding the others.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default compare 2 tables of dates to find the preceding dates

=IF(A1<B1,"A1 is the earlier date","B1 is the earlier date")

"Babi" wrote:

I have 2 tables of dates in the format DD-MM-YYYY.I want to compare the 2 set
of dates to find out which dates are preceding the others.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default compare 2 tables of dates to find the preceding dates

Hi,

This is a little unclear. Which dates precede which dates? I will assume
that you are comparing the first cell of the first table to the first cell of
the second table.

Suppose table1 starts in cell A1 and table2 starts in cell H1, you can enter
the formula =A1-H1
If the result is positive A1 is later than H1. If not, the other way
around. If you want to get fancier you could use conditional formatting.
Select the cell you want to compare, A1, and choose Format, Conditional
Formatting, pick Formula is from the first drop down and enter the formula
=A1-H10
Click the click the Format button and choose a color on the Patterns tab.
Click OK once and then click Add
From the first drop down for this second condition pick Formula is, and
enter the formula
=A1-H1<0
Format this condition with a different color.
You can copy this format to all the cells in the first table and every cell
will be color coded to indicate if it is before or after the other cell
datewise. If no color appears the date are the same.
Modify the above as needed.


--
Thanks,
Shane Devenshire


"Babi" wrote:

I have 2 tables of dates in the format DD-MM-YYYY.I want to compare the 2 set
of dates to find out which dates are preceding the others.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default compare 2 tables of dates to find the preceding dates

I have 2 tables of dates in the format DD-MM-YYYY
I want to compare the 2 set of dates
to find out which dates are preceding the others


Real dates are just numbers, hence you should be able to just Data Sort to
taste. If it doesn't respond to sort, then the dates are not real dates
recognized by Excel. In which case, you can try using Data Text to Columns
to convert it all at one go (ie the col(s) of "dates") to real dates. In step
3 of the wizard, check "Dates", then select the appropriate date format (eg:
DMY) for the data.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,500 Files:362 Subscribers:62
xdemechanik
---
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare dates with lag adimar Excel Worksheet Functions 5 February 2nd 08 11:21 AM
compare dates Thea Excel Worksheet Functions 1 April 27th 07 01:17 AM
How do I find the earliest dates in a range of dates? JJ Excel Worksheet Functions 3 May 16th 06 09:36 AM
Compare two dates and if they are equal PeterArvidsson Excel Discussion (Misc queries) 1 April 21st 06 02:40 AM
how do I compare two dates? SlipperyPete Excel Worksheet Functions 3 April 19th 06 05:40 PM


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"