ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do i flag a cell using background color (https://www.excelbanter.com/excel-worksheet-functions/106311-how-do-i-flag-cell-using-background-color.html)

Heather

how do i flag a cell using background color
 
I need to know how to change the background color of a cell based on data
entered. Such as a date that is more than a year the background of that cell
turn red.

WLMPilot

how do i flag a cell using background color
 
You want to use CONDITIONAL FORMATTING. After clicking on the cell you want
to check, open the conditional format window, change CELL VALUE IS to FORMULA
IS in the combo box. The you will have a space to enter the formula. If I
understand what you are trying to do, lets say A1 = 10/30/2007. Want to to
check that date against today's date and flag it if it is more than a year
away. If that is the case, then the formula you need to type in is:

=AND(A1<"", A1TODAY()+365)

Suggestion: If you are using a dark background, ie red, blue, black, etc, I
would change the font to white also.

Les

"heather" wrote:

I need to know how to change the background color of a cell based on data
entered. Such as a date that is more than a year the background of that cell
turn red.


JLatham

how do i flag a cell using background color
 
And if you need to go the other way with a date (is it more than 1 year in
the past), then again, use Format | Conditional Format

Choose [Cell Value Is] then in the condition choose Less Than
and in the formula area to the right, enter this
=(NOW()-365)
or, to be more precise
=(NOW()-365.25)
Set up your format. Now if the date is more than a year behind the current
date, it will get flagged. Obviously, once it gets that old, it's going to
stay that older as NOW() increases day by day.

NOW() returns the current system date/time, so it's always current, not
static on a worksheet.

"WLMPilot" wrote:

You want to use CONDITIONAL FORMATTING. After clicking on the cell you want
to check, open the conditional format window, change CELL VALUE IS to FORMULA
IS in the combo box. The you will have a space to enter the formula. If I
understand what you are trying to do, lets say A1 = 10/30/2007. Want to to
check that date against today's date and flag it if it is more than a year
away. If that is the case, then the formula you need to type in is:

=AND(A1<"", A1TODAY()+365)

Suggestion: If you are using a dark background, ie red, blue, black, etc, I
would change the font to white also.

Les

"heather" wrote:

I need to know how to change the background color of a cell based on data
entered. Such as a date that is more than a year the background of that cell
turn red.



All times are GMT +1. The time now is 11:14 PM.

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