ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional formatting based on one cell in a row (https://www.excelbanter.com/excel-programming/338092-conditional-formatting-based-one-cell-row.html)

achidsey

Conditional formatting based on one cell in a row
 
Dear Experts:

I want to format each row in my spreadsheet based on whether the date in one
cell in that row is prior to today, today or withing the next 30 days, or
more than 30 days in the future.

My spreadsheet is similar to the following:

A B C
1 Name Deadline Filed
2 Broadcom 8/01/05 Yes
3 Dell 8/23/05 No
4 Intel 9/23/05 No

For the filled-in cells in each row, I would like to have the following
formatting:
- a fill color of yellow if the date for that row in column B is today or
within the next 30 days,
- a fill color of light blue if the date for that row in column B is before
today
- leave as the default of no fill if the date is more than 30 days in the
future.

Of course, the formatting for a given row will be different depending on
what day the speadsheet is opened.

Thanks for your assistance,

Alan







--
achidsey

Tom Ogilvy

Conditional formatting based on one cell in a row
 
Since you use the term conditional formatting, are you aware you can do this
with Conditional formatting under the format menu - no macro required.

http://www.contextures.com/tiptech.html

look in the contents under C and conditional formatting.

--
Regards,
Tom Ogilvy




"achidsey" (notmorespam) wrote in message
...
Dear Experts:

I want to format each row in my spreadsheet based on whether the date in

one
cell in that row is prior to today, today or withing the next 30 days, or
more than 30 days in the future.

My spreadsheet is similar to the following:

A B C
1 Name Deadline Filed
2 Broadcom 8/01/05 Yes
3 Dell 8/23/05 No
4 Intel 9/23/05 No

For the filled-in cells in each row, I would like to have the following
formatting:
- a fill color of yellow if the date for that row in column B is today or
within the next 30 days,
- a fill color of light blue if the date for that row in column B is

before
today
- leave as the default of no fill if the date is more than 30 days in the
future.

Of course, the formatting for a given row will be different depending on
what day the speadsheet is opened.

Thanks for your assistance,

Alan







--
achidsey




Bob Phillips[_6_]

Conditional formatting based on one cell in a row
 
Select all the cells A2 on and use formulae of

=AND(B2=TODAY(),B2<=TODAY()+30)
=B2<TODAY()

set the pattern colours accordingly

--

HTH

RP
(remove nothere from the email address if mailing direct)


"achidsey" (notmorespam) wrote in message
...
Dear Experts:

I want to format each row in my spreadsheet based on whether the date in

one
cell in that row is prior to today, today or withing the next 30 days, or
more than 30 days in the future.

My spreadsheet is similar to the following:

A B C
1 Name Deadline Filed
2 Broadcom 8/01/05 Yes
3 Dell 8/23/05 No
4 Intel 9/23/05 No

For the filled-in cells in each row, I would like to have the following
formatting:
- a fill color of yellow if the date for that row in column B is today or
within the next 30 days,
- a fill color of light blue if the date for that row in column B is

before
today
- leave as the default of no fill if the date is more than 30 days in the
future.

Of course, the formatting for a given row will be different depending on
what day the speadsheet is opened.

Thanks for your assistance,

Alan







--
achidsey





All times are GMT +1. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com