Reputation: 21
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
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
Reputation: 15065
If you're only working with dates, then using a difference will give you days, which you can use in your comparison.
For example, you may condition in the following way:
Upvotes: 2