Sorting Data

  • Thread starter Thread starter ginnie
  • Start date Start date
G

ginnie

If I have two columns, Column A which has Dates and Column B which has
numerical values for that date. And I have several dates that I need to take
that specific date and the 20 days before/after. What formula can I use that
will highlight the range.
 
Suppose your target date is in D1. Highlight columns A and B so that
A1 is the active cell, and click on Format | Conditional Formatting
and then choose Formula Is rather than Cell Value Is in the first
panel of the dialogue box. Enter this formula in the next panel:

=AND($A1<=$D$1,$A1>=$D$1-20)

Then click on the Format button, then the Patterns tab and then choose
the colour you would like for the highlight. OK your way out of the
dialogue box. Excel will adjust the cell references above
automatically for all cells in the range.

Hope this helps.

Pete
 
Back
Top