Conditional Format Range Based On Date

Sep 8, 2009

I have a monthly calender, with each month on its own sheet. I have a sheet named Holidays, which list the holidays. I have been able to use conditional format and highlight the dates in the months the holidays fall on, but I would like to highlight a range of cells below the date on monthly sheet. I have attached a sample of what I have and would like to achieve. I am not much good at using VBA, but would not be against using it either.

View 2 Replies


Conditional Format One Cell Based On A Date?

Jan 18, 2013

I have two cells. both formatted to contain dates.

cell a1 will have a date in it. cell a2 will have a date calculated to be cell a1 + 42 days.

now, when cell a2 reaches a date that is greater than cell a1 + 42 i want cell a2 to be formatted as fill red.

so, i have tried a conditional format as =a1+42 >=TODAY() but it always highlights as red even if the value in cell a2 is less than cell a1+42.

View 5 Replies View Related

Conditional Format To Highlight Cell Based On Corresponding Date

Jul 24, 2013

Not very good at this but I have the basic sheet attached. All I want is a way to highlight the first cell when the date is within 30 days of the "Due date".

Calibration Record-example.xls

View 4 Replies View Related

Count Conditional Format Cells In Date Range

Apr 30, 2009

Hello, we have a stop light spreadsheet for status with several different projects. In each row there are conditional format status green - good, yellow - needs work, red - bad...based on data from another tab.

There is an "overall status" column that pulls the worst color that exists for a given row.


There is also a date for each row. Now we want to pull the worst color in the "overall status" column for a date range...and display that on a separate summary tab.

For 4/1/09 thru 4/15/09 - pull the worst color from the "overall status" column from that date range.

View 10 Replies View Related

Using Conditional Formatting To Format Range Based On One Cell

May 20, 2009

I am working with the Conditional Formatting, which is fine for one cell. Here is what I am trying to do: IF cell in $A1 = 1 then bold $B2:$M2 and apply solid line border to top of cell ranges. I have tried conditional formatting but it only formats the cells in column A. And I can't seem to find a BOLD statement for the cell formulas.

View 2 Replies View Related

Conditional Format Based On A Text Range Within A Cell

Nov 11, 2009

conditional format formula that is based on a text range within a cell. In my case, I would like to compare the low and high range when inputted as a number followed by the quotation marks followed by space then hyphen, space then number and ending in quotation marks. The quotation mark is being used to represent inches.

Like this in cell D14: 0.2 - 2.2

I am using the following condition format formula which works for the strict case above.

HTML =OR(D16<LEFT($D$14,3)+0,D16>MID($D$14,8,3)+0)
However, there will be times when users using this spreadsheet may leave out the spaces on either side of the hyphen, or add more than one space between the number and hyphen. Also if additional digits are added, my formula above does not include all the digits in the results. I prefer to leave the quotation marks in...........

View 9 Replies View Related

Conditional Format Range Based On Numbers Present In Another

Jan 18, 2008

I need to check a range of cells for 2 different values. If either value is present, I need to shade a cell (outside the original range) red. If neither value is present I need to shade the cell yellow. Can this be accomplished with conditional formatting?

View 2 Replies View Related

Conditional Format Color Of Cell Based On Values In Range Of Cells?

Oct 24, 2013

I would like to format the color of cell A1 on Sheet 1 based on true or false values from cell range A1:A10 on sheet 2. For instance:

1. If all cells on sheet 2 in range A1:A10 were false then cell A1 on sheet 1 would be red.

2. If some cells on sheet 2 in the range A1:A10 were false and some were true then cell A1 on sheet 1 would be yellow.

3. If all cells on sheet 2 in range A1:A10 were true then cell A1 on sheet 1 would be green.

View 5 Replies View Related

VBA Conditional Format Range Of Cells Based Upon Criteria In One Cell / Repeat For All Rows

Apr 3, 2014

Code is trying to

1. Where there is data in column B
2. Goto first row of data
2. If column J = "Closed"
3. then select Cells from column B to J in that row and colour these cells in red
4. If column J= "Open"
5. the select Celss from column B to J in that row and colour these cells in grey
4. Repeat for next row until you get to cell in column B where there is no data.

Recieve run time error 1004: Method 'RAnge of object_GLobal failed

Sub Colourclosed()
Dim LastRow As Long
Dim i As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
For i = 8 To LastRow
If Range("J" & i).Value = "Closed" Then Range("B", "J" & i).Select
Selection.Interior.ColorIndex = 3


Note: I've managed to do it for one cell ie for Column B by replacing "If Range("J" & i).Value = "Closed" Then Range("B", "J" & i).Select with "If Range("J" & i).Value = "Closed" Then Range("B" & i).Select" This works but only colours in cell in column B, how do i do this so it colours range of cells

View 4 Replies View Related

Conditional Formatting - Colouring Percentage Of Multiple Cells Based On Date Range

Mar 12, 2014

I am trying to get a row of cells to highlight a percentage based on a date range

Below is an example of what my spreadsheet will look like, very simple for managers to read and understand but I am stuck on how i can get this to display the right way.

In the example i would need the Jan column to colour for a certain percent for 21 days and continue to feb for 26 days. Im not sure if this makes sense but this is what they are asking for. Colour bars to simple show the percent of days off each month.

Name Start Date End Date Jan Feb Mar

Dale 11/01/14 26/02/14 21 days 26 days

I have attached the spreadsheet for an example : Book1.xlsx‎

View 3 Replies View Related

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.


View 3 Replies View Related

Conditional Format Based On A Conditional Format

Feb 9, 2010

I have five fields that have a conditional format applied to them: (see attached).
Columns J, K, L, N and O. These conditionals highlight if a minimum number is entered. Ex. Minimum pushups for a 30 y/o male is 27, if a 26 is entered it highlights red. The total score (where I need this to perform) is calculated in column Q. It will format red if the total score is below 75 but what I can't figure out is how to make it format if any of the previous minimums have not been met.

Ex. In cell L4, his crunches were 25 (a automatic failure -- red formatting). Now the total score is above 75 so it calculates as passing (green), but I need it to highlight red regardless because of the minimum not met in cell L4.

View 2 Replies View Related

Conditional Format For A Date?

Aug 21, 2014

I am having trouble with a conditional format of a date. I need it to turn the date red if it is 35 days older than today.

View 3 Replies View Related

Conditional Format Based On Even / Odd?

Apr 23, 2007

I want to be able to change the font color of the numbers in a column based on even or odd. I selected the columns and formated them to all be blue... thats the color I want for even, but now I can't figure out how to set a condition that checks for odd numbers and changes them to red. I now have a count of even/odd for all records, and even/odd for the last 30, this provided some very interesting results.

View 9 Replies View Related

Counting Based On Conditional Format

May 30, 2007

i have a spreadsheet which is used to keep the training records for the company it counts no of staff and their skill levels for different parts of the job, when a person moves to a different branch the skill required changes and they have a set period of time to aquire the new skill.

when the time is up the colour of the old skill is changed to a red font by a conditional format based on the date.this is then counted by a calculation so the team know how many people are to be targeted for extra training.

the problem i have is the calculation will not count conditionally formated cells, so whenever i update the sheet i have to go to each cell with red text and change the font colour manually to red, this sounds really silly and is impossible to explain to anyone who does not understand conditional formatting. i e the people who will end up using the database

what im looking for is a way to count conditionally formatted cells based on the condition being met i.e. they are showing as red font.

View 13 Replies View Related

Conditional Format Based On A Time

Nov 6, 2008

I have a row of cells pertaining to jobs B3 across to I3.

In B3, C3, D3, E3 the value entered is text.
In F3, G3, H3, I3 the value entered is time.

What I am trying to do is to change the Background colour to Red on cells
F3, G3, H3, I3 if either H3 or I3 or are empty at the end of the current day but only if there is some text in any or all of the cells B3 - E3

So for example if H3 or I3 have no time put in them by 23:59 today, when the workbook is opened tomorrow the cells background colour will turn red.

Not sure if this if poossible or not? hopefully I have explained it well enough but if not pease let me know.

View 14 Replies View Related

Conditional Format A Row Based On The Value Of The A Column Of The Row

Oct 24, 2007

I have the following code. I am trying to conditional format a row based on the value of the A column of the row.I have a total of 3 rows. I have to use VBA because in time I may have 4 rows of data. The problem is I after the first do while loop the code stops and the code doesn't proceed to format row 2.

View 2 Replies View Related

Delete Row Based On Conditional Format

Feb 9, 2010

Im having some issues with some code Im working on. My goal is to delete the rows that do not have conditions met. Conditional formatting is used in 6 columns of my spreadsheet and the cell fill is to turn red when below .50 . This code is shown below. What I need to do now is look at the 6 columns where the conditions are applied, and delete any rows where the column cells are not red. To further clarify, if in row 1 column X:X does not meet criteria, but column AL:AL does, the row would not be deleted. However if none of the columns meet the criteria, the entire row is deleted.

View 6 Replies View Related

Conditional Format Based On Cell Value - VBA

Jan 17, 2014

With the click of a toolbar button, I've got my vba inserting a new tab, renaming it, inserting headers and now working on the code to insert all the formulas needed in 12 columns to copy down as far as there is data.

The 4th column D is the hardest. Currently, I'm using manual "Conditional Formatting" to colorize the cells in Col D but need the VBA to place that "Conditional Formatting" code into the sheet so that when the sheet is created, it will hold the conditional formatting feature.

Specifically, the formulas I'm using in the Conditional format wizard are:

Formula: =$B2$D2 then turn the cell red Applies to: =$D$2:D

Copy down (in other words, the colorizing should work all the way down Column D as long as there is data in Col D.

View 2 Replies View Related

Conditional Format Row Based On Cell Value - VBA

Jul 23, 2014

How to write a VBA that will, if the value of a cell in column "U" is TRUE, that row's FONT (for the row the TRUE cell is in) will turn red.

View 4 Replies View Related

Conditional Format Based On Dates

Mar 17, 2007

I have a spreadsheet with due dates in column X. I want to create conditional formatting so that cells turn red when the due date is less than or equal to 30 days away, but turn gray when the due date has passed.

I've accomplished the first step by using the following: =AND($X6

View 9 Replies View Related

Conditional Format Cell Based On Value Of Another

Feb 19, 2007

I'm afraid as its a multiple conditional format and thus needs coding. At the moment I'm using the following

Private Sub Worksheet_Change(ByVal Target As Range)
' Conditional Formatting for more than 3 conditions
Dim rng As Range
' Target is a range::therefore,it can be more than one cell
' For example,,someone could delete the contents of a range,
' or someone could enter an array..
Set rng = Intersect(Target, Range("E27:E34,G27:G34,I27:I34,K27:K34,M27:M34,O27:O34,Q27:Q34,S27:S34,U27:U34,W27:W34,Y27:Y34,AA27:AA34"))

If rng Is Nothing Then
Exit Sub

This works very nicely, so that for example if I type the number 10 into cell M33, that cells fill colour becomes black (and the text turns white). Alas I would now also like to extend the fill and text colour to the cell one to the left too. To take this example I would type 10 into cell M33 and cells L33 and M33 would both be filled black and their text would be white. I'm not sure if this requires a change to the code, or if its possible to just have a formula or something which copies the fomatting of one cell into another

View 2 Replies View Related

Conditional Format A Named Range?

Nov 18, 2013

I am trying to use conditional formatting to basically unhide a named range when a specific text is input into a range of cells from C23:C32. I have taken the named range "Screw_Test" and changed the formatting to make it hidden. White text on white background, that sort of thing. What I would like is to change the background color and text color back to something visible when the following is met. In C23:C32 I have a drop down. When Pedicle screw is picked in any of the afore mentioned cells, it would trigger the conditional formatting that would change the "Screw_Test" range (D22:F32) as a whole, making it visible. I haven't had much luck.

View 4 Replies View Related

How To Apply Conditional Format To A Range With VBA

Feb 27, 2012

I recorded a macro in which I applied a conditional format to a range (the selection).But, when i replay this macro, the conditional format is only applied to the first cell in the range. This can be seen in the "Manage Rules" dialog of Conditional formatting, where the "applies to" column shows only one cell, even though a range of cells was selected by the code.

I set a breakpoint at the first line of code here, and confirmed that the selection is correct, and indeed it is, as in the immediate window, ?Selection.Address correctly gives "$O$6:$O$21".

[BRK, Selection.Address="$O$6:$O$21"]
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
With Selection.FormatConditions(1).Interior
.Pattern = xlGray16


why the conditional format ends up only applied to cell O6 after the code runs?

"How can i apply a conditional format to a range of multiple cells, based on an expression, using VBA?"

Note that my range is within a PivotTable (but still, this works fine in the UI when i record the macro and the conditional format is correctly applied to the entire selected range).

View 1 Replies View Related

Conditional Format Over Range Of Rows

Feb 25, 2008

I've been trying to get around the 3 rule limit for conditional formatting,
and I've found the code I need on the site


I've changed it to suit my needs

Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer
If Not Intersect(Target, Range("A1:A2000")) Is Nothing Then
Select Case Target
Case Is = "Test"
icolor = 6
Case Is = "Test2"
icolor = 12
Case Is = "Test3"
icolor = 7
Case Is = "Test4"
icolor = 53
Case Is = "Test5"
icolor = 15
Case Is = "Test6"
icolor = 42
Case Else
End Select

Target.Interior.ColorIndex = icolor

End If

End Sub

This works great for one cell, but I need to format a row range based on the single cell.
So if Test is entered into A1, then it changes to yellow, I also need the next 6 cells on the row to change too- In this case [B1:G1].

But it needs to cover the range in the code A1:A2000

View 9 Replies View Related

Formula In Conditional Format Range

Jan 12, 2007

I want to gray out a row of cells (B11:M11) when "x" is entered in cell M11. Suggestions for using Conditional Formatting or a formula would be great. I have tried a couple of formulas but none work.

View 9 Replies View Related

Conditional Formatting: Format The Range

Jul 5, 2007

I have a range A1:A20. Each cell in this range contains a number between 1 and 100. I'd like to be able to format this range so that the top 3 or largest 3 numbers appear in red.

View 3 Replies View Related

Conditional Formatting Cells To Show No Format If Cell Contains A Date

May 3, 2014

How can I condition format a cell to show no format if the cell contains a date

Please see the attached book1.xlsx for more info. Book1.xlsx

View 7 Replies View Related

Conditional Format - Highlight Cell Based On The Value Of Another?

Jul 24, 2013

Looking to use conditional formatting to highlight a cell based on the value of another.

I.E. Highlight Cell B2 if Cell A3 is 4 or greater.

View 2 Replies View Related

Conditional Format Formula Based On Two Cells.

Apr 9, 2009

I want to create a conditional format formula which is based on values in 2 cells.


Cell B1 = 100
Cell C1 = 50

I want a formule for cell A1 which turns red for exmaple when B1 is higher then 85 and Cell C1 is lower then 85. Only in this case the conditional format should work.

View 8 Replies View Related

Copyrights 2005-15, All rights reserved