user3389354
user3389354

Reputation: 21

Compare dates in two columns

I need to compare the dates in two columns of a spreadsheet to see if one date is 2 days greater than the other date. For example, does the date in column H2 = the date in column A2 + 2 days? What is the formula for such a comparison?

Upvotes: 2

Views: 1924

Answers (2)

pnuts
pnuts

Reputation: 59475

For comparison, a visual indication may be adequate or even be more appropriate, for which Conditional Formatting is well suited:

Say select columns A and H, HOME > Styles - Conditional Formatting, New Rule..., Use a formua to determine which cells to format, Format values where this formula is true:

=$A1+2=$H1 

Format..., select to suit, OK, OK.

Upvotes: 0

Werner
Werner

Reputation: 15065

If you're only working with dates, then using a difference will give you days, which you can use in your comparison.

enter image description here

For example, you may condition in the following way:

enter image description here

Upvotes: 2

Related Questions