# Conditional Formatting Based On Number Of Years From Now

Dec 17, 2013

I have a list of 2000 pieces of inventory. Only the year of purchase is associated with each one, not a specific month or day. I'm trying to apply conditional formatting so that...

Less than 2 years old = green
Between 2 and 4 years old = yellow
Between 4 and 6 years old = orange
More than 6 years old = red

I've been trying =TODAY()-365 (365 replaced by number of days in the above named ranges) but the cell only changes to the color of the most recently applied formatting rule.

## Excel 2007 :: Conditional Formatting Dates Based On Number Of Days That Have Passed?

Nov 22, 2011

I am trying to figure-out how to set up conditional formatting of dates in a column (e.g. Date Submitted) and have these dates, and/or cell, change color as time progresses. I have Excel 2007.

For instance I have an application submitted on 11/20/2011 in a cell. I would like to have the date change color (Yellow) after 30 days have passed.

Then do the same except change to Red after 60 days have passed the date.

I searched the forums and did not find this particular problem. I of course may have missed it too...

My guess was to try "\$A\$1

## Display Number Of Years Based On A Date

Mar 28, 2009

Right now, in a column I would like to display an number (length of employment) based on the hire date.

In one cell the employee's hire date is entered. In a column of other cells the pay period ending date is displayed and in another column the length of employment is displayed.

Example:

03/17/2000

03/01/2009 8
03/15/2009 8
03/29/2009 9
04/12/2009 9
04/26/2009 9

How would I create a formula in the length of employment cells that would indicate the correct number of years based on the hire date and adjusts when the pay period date passes this hire date?

## Conditional Formatting Based On Another Cell Conditional Format

Mar 20, 2013

Is it possible to change the format of cell AI3 based on the format of cell C3 and D3? I have C3 and D3 set to turn red based on what is in cell C2 and D2. I would like the following done:

If AI3=C3 & C3 is red, format AI3 blue
If AI3=D3 & D3 is red, format AI3 blue
Otherwise, leave AI3 unformatted.

Possible???

## Conditional Formatting - Reference Number

Feb 28, 2013

I have a row of data I want to be blacked out if there isnt a reference number in the first column

So if I type the reference number i can in theory then use the rest of the row but if there is no reference number in the first column i cant see any of the row ...

## Conditional Formatting For Number Format?

Mar 2, 2014

Can I use conditional formatting to determine if a number in a cell is displayed as a normal decimal or scientific?

So a number of 1000 or above will be changed to scientific notation with 4 significant figures.

## Conditional Csutom Number Formatting

Sep 21, 2007

i am trying to change the number format of one cell from say "general" to hh:mm:ss depending on the number format of another cell using a macro...

heres what i have so far.

Sub cellFormat()
If Range("F4").NumberFormat = "hh:mm:ss" Then
Range("F2").NumberFormat = "hh:mm:ss"
Else
Range("F2").NumberFormat = "General"
End If
End Sub

but its not working, can anyone see the error of my way?

## Conditional Formatting For The Number Of Working Days

Jan 7, 2009

I am trying to do a conditional formatting for the number of working days. What I am trying to do is:

Example:

As in the row D7 I give the actual workdays required to finish the task the Gantt Chart gets a specific formatting on the right appears for the number of working days.

Problem:

I want to avoid the formatting if there are any weekend (Saturday or sunday)

Suppose I give number of working days as 20 then there would be 6 weekend days so it shall add to the overall actual working days but again sinnce we are adding 6 additional days one more weekend day would come in between so the formatting shall take care of this.

## Conditional Formatting: Highlight The Lowest Number

Jan 12, 2008

I have in a range B10:B110 formulae that returns a number. When I try and use CF to highlight the lowest number, it does not trigger. Is it not possible to have both a formula and CF in the same cell, that triggers the CF.

The formula to return a number is

=IF(B\$5

## Conditional Formatting : Changing Number Format

Sep 18, 2006

I would like to change the number format of a cell in function of the value of another cell. For example, if A1=1, then I would like the cell A2 to be displayed as a percentage. If A1=2, then would like the cell A2 to be displayed as a number.

## Sum Based On Conditional Formatting?

Feb 2, 2012

I currently have a spreedsheet which has a conditional formatting cell where if the figure is above 1 is green and below red what i am trying to do is get a sum to calculate based in its color?

I.E. I have a value in cells F7+F25+F27+F29 i then have a value in F17 but only want this to be included in the total calcualtion if the figure in E15 is equal/above the value of 1.

## Conditional Formatting Highlights Same Number Even If Positive / Negative

May 29, 2013

Can I use Conditional formatting (highlights duplicate values) but highlight the number even if the number is an Positive or Negative number.

It must highlight the number if it's -300 or 300 in both instances.

## Conditional Formatting If Number Starts With Specific Digits

Jan 23, 2014

I am trying to apply conditional formatting to highlight the cells in D column if it starts with 91099 or 91004.

I tried to do the same using wild card, and left function but didn't get the desired output.

## Conditional Formatting Text Equaling To Number Formats?

Apr 20, 2013

Conditional Formating Text equaling to Number formats:

Example:
C20 is '436.59 (its pasted as text often is must remain as text) and D20 is 436.9535

I want D20 to have only 2 decimals and turn green if it equals C20. And turn red if it doesnt equal C20.

## Conditional Formatting On Cell Based On Value

Jul 29, 2014

In Excel, I want to do conditional formatting on a cell based on the value of another cell. For example: in cell A1, I have text. I want this cell to have a grey background if the value of cell B1 is less than or equal to 1/31/14 and to have no fill (default) if it is greater than that date.

## Conditional Formatting Based On Another Cells Value?

Aug 18, 2014

On the attached worksheet I'm looking for the squares in F4:F6 to be coloured corresponding to the colour names in D4:D6 using conditional formatting. I just can't get it to work today.

## Conditional Formatting Based On Cells?

Mar 30, 2014

I have a worksheet which has the years 2001 to 2013 on in row1. I am trying to find a way of highlighting the entire row in green if a specific year contains an "a" (Marlett, tick). The complex part is that I would like the specific year to be determined by an entry input into cell A2 on sheet 2. See Attachment for reference.

## Conditional Formatting Based On A Value In A Different Cell?

Apr 9, 2014

I am working in a table where I would like the whole row to highlight based on the value in one of the cells. These rows of data will be updated regularly, so the formatting has to change with the data.

## Conditional Formatting Of A Row Based On A Value In A Cell Of That Row

Feb 17, 2010

I want to create a conditional formatting based on a cell in a row. If the value of that cell is greater than or equal to \$20 the entire row would be highlighted with a color.

the main thing is that the cells in the rows have if formulas that supple the data for the cells. The cells will be blank if nothing is to be displayed but they will still contain the formula.

## Conditional Formatting Based On Value Of Another Cell

Jun 4, 2012

I want to format a cell conditional on the value of another cell. I have read numerous threads on the topic and no matter what I do, it doesn't seem to work for me. I've made it a simple as possible by creating a new workbook and entering:

A1: 5
B1: 2
C1: Some random text - this cell has the conditional formula: ="A1>B1"

However, the cell doesn't get formatted. Here is a screenshot and here is the simple workbook.

## Conditional Formatting Based On % In Other Cell

Feb 15, 2013

I want to color format a cell based on a percentage value in another cell but I just can't get my head around how to solve it. I've attached a file that explains it better.

E.g.
The formatting for A1 should be something like:
If A2 is
> +/- 10% RED
+/- 6-10% YELLOW
+/- 5% GREEN

Attachment 214464

## Conditional Formatting Based On Percentage

Oct 5, 2013

I need a conditioning format formula. If cell A2 is less than 50% of cell A1, then highlight red.

## Conditional Formatting Based On Several Conditions

Oct 11, 2013

I am trying to do some conditional formatting to highlight rows based on several conditions, I don't know if this is possible, but these are the criteria:

AAPL
tt
10/1/2013 11:14:15

GOOG
ll
10/1/2013 11:14:20

[code].....

I want to highlight a row if:

- the difference in time value is < 20 seconds

- the first symbol column is the same

- at least one, but not all of the rows meeting the above criteria contains a value in the second column from a given list (in this example, say tt is on this list)

So if done properly the logic would highlight the first and third rows, but would highlight none if none of the values in column two match my list.

I think the test criteria would go something like this, however I know that there are problems with my row references.

=and(abs(\$C2-\$C3:\$C65536)<0.0003,\$A2=\$A3,match(\$A2,Sheet1!A:A,0)>0)

## Conditional Formatting - One Cell Based On The Value Of Another

Jan 6, 2014

I am attempting to apply conditional formatting such that cell B3 is green if it is greater than or equal to cell B2, and red if less than cell B2. Then to apply this conditioning across the row of data (i.e. C3 >= C2 green, C3 < C2 red; D3 >= D2 green, D3 < D2 red; E3 >= E2 green, E3 < E2 red ... etc.). Needs to be formatted such that if I change the value in cell B2, the colour of B3 is automatically updated.

## Conditional Formatting Based On Value In Another Column

Feb 17, 2014

I have a value in column H7 as 2000.

I have columns M to X labeled Jan to Dec. I want to highlight in yellow values in the row M7 to X7 if they are greater than 2000!

Then, I need to copy this conditional formatting down the columns under M to X, but under column H the values will be different, but I still want the same results, values greater than the value under column H then highlight in yellow.

I thought I had the answer but when I tried to copy down, it was making cells yellow that were clearly less than the column H value.

## Conditional Formatting Based On Two Criteria (Using VBA)

Apr 7, 2014

how to create VBA code for conditionally formatting a column of dates that have expired. My unique challenge is that I first need to associate the item attached to the date with the expiration date of a particular group. Therefore, I have to first match the Item label with the appropriate group, and then I need to evaluate the expiration dates of both the Group and the Item. If the Item expires before the Group expires, then I need the Item date to be formatted in bold and with a red font.

Thoughts about how to accomplish this with VBA? By the way, VBA is the necessary approach due to the fact that the data is updated several times per day, and all existing data is erased prior to uploading new data.

## Conditional Formatting Based Upon Various Dates

Oct 7, 2008

I have a spreadsheet I'm trying to make which will have various cells change color based upon the date entered compared to today's date. Here are the details of it, and what I've tried to do so far:

Various safety tickets that employees acquire have a 3 year expiry date on them. What I want to do is be able to enter in the issue date, and then have the conditional formatting color the cell that contains the date based on the following criteria:

Green = More than 6 months remaining
Yellow = Between 6 months and 30 days remaining
Red = 30 days until expiry

Black = Expired (I wanted to eventually add this one, but Excel 2003 was only allowing me to add 3 conditional formatting conditions, so I just went with the 3 colors. I'm getting Excel 2007 later today, so I might be able to add more with that)

Now here is what I have so far:

3 years = 1095 days, 2.5 years = 913 days, 2 years and 11 months = 1065 days

N3 = 913
N4 = 1065

Conditional Formatting on cell C21

Condition 1 - color Green

=\$C21+\$N\$3>=TODAY()

Condition 2 - color Red

=\$C21+\$N\$4<TODAY()

Condition 3 - color Yellow

=AND(\$C21+\$N\$3<TODAY(),\$C21+\$N\$4>TODAY())

## Conditional Formatting Based On Now Formula

Feb 19, 2010

My attached spreadsheet is for tracking when certain tasks were completed on each case and figuring the number of days that it takes to complete these tasks.

The task I am needing help in formatting is the Corrections Received field (column E). We need to track the cases that do not have corrections received within 7 days of the changes being requested (Out for Corrections, column D). The issue is that there would not usually be a date entered in the Corrections Received column when we need to look at those cases...because they would not be received yet. In order to not get an extreme default value (like the -40181 or 40922), I entered the =Now() function in column E (except for first case as an example of what this would look like otherwise).

What I was hoping to be able to do is use conditional formatting to look for that Now() formula. If the formula is present, the cell would be highlighted. If a date were entered, even if it was today's date, the fill on that cell would be removed. That way we could tell when the displayed date is a true date and when it is a placeholder until we receive the information.

Currently, it either highlights no matter what the cell includes or it doesn't highlight anything...

## Conditional Formatting Based On Person Name?

Apr 6, 2012

[URL]

Viewing only displays half the written request, but I downloaded it, and it was ok

## Conditional Formatting Based On Two Ranges

Aug 13, 2013

Any way write a conditional format formula to shade a cell based on two ranges.

Here is what I need:

cell b4 should be colored in if n4:xfd4 = today's date AND n3:xfd3 = "Time Off". The part I am having trouble with is that it should only shade if today and time off are in the same column.

Here is an example:

This one should shade B4(note: Today is 08/13/2013):

time off
late

08/13/2013
08/10/2013

This one should not:

late
time off

08/13/2013
08/10/2013

This is what I came up with so far, but it shades the cell if either show up in the entire range:

=AND(MATCH(\$G\$1,\$n\$4:\$XFD\$4),MATCH(\$H\$1,\$n\$3:\$XFD\$3),1)
Note: g1 contains =today() and h1 = "Time off"

So formula is wrong.