View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ShaneDevenshire ShaneDevenshire is offline
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.