Invest a few minutes and learn how to correctly use relative and absolute cell references in Excel conditional formatting rules. This knowledge will certainly save you far more time in the long run. Continue reading
by Svetlana Cheusheva, updated on
Invest a few minutes and learn how to correctly use relative and absolute cell references in Excel conditional formatting rules. This knowledge will certainly save you far more time in the long run. Continue reading
Comments page 3. Total comments: 97
Hello,
please, I need to find out right rule of a conditional formating for more than one cell value in a whole table columns.
It is possible to write a formula like this:
=AND(50, 30, 20, ... )? - for more values e.g.
Or more sophisticated. How?
Thank you for your help.
Best regards.
Hello Svetlana
I am producing an excel table that has details of people with expiry dates of their qualifications in four columns. I have managed to conditionally format the cells containing the dates to change colour with less then 6 months to run to expiry and when expired ["cell less than"=NOW()]. I have the surnames of the people in column A. What I would like to do is change the colour of the cell containing their surname if they are expired (depends on data in 4 different columns) and also for the colour change to move correctly with the rows should I sort one of the columns other than surname.
I am trying to compare two cells with text info in two columns. Any that don't match I would like to be highlghted
The original value is in column C, the comparison value is in column F.
The formula I tried is =$C2$F2
this seems to apply the conditioning randomly, whether the cells match or not.
Have also tried Cell Value: $C2 (almost all cells get formatted, whether they match or not except blank cells)
Not sure what I'm doing wrong here.
Thank you Svetlana, its working.
Hi, I have query that
In a excel cell (say A1), i am having values like
1
2
and I am giving that same cell as reference in another cell (Say B1) but I am getting the value as "12" instead of
1
2
Thank you in advance.
Hi Pavan,
The point is that Excel formulas deal with cell values, not cell formatting. To fix the issue, you can select the cell with your formula, and click the 'Wrap Text' button on the Home tab, in the Alignment group.
hi
what is the formula in this problem
prelimid100term100semifinal100 final90 if 100 is plot 1 in 1 column
Hi Svetlana,
If a column contains a list of numbers such as:
5
8
8
4
6
6
6
7
How can set a conditional format such that the first occurrence appears as bold and the rest as normal. In the above list, the first occurrence of 5, 8, 4, 6, and 7 should appear as bold, while the rest can appear as normal.
Hi Rajendra,
You can create a conditional formatting rule based on the following formula, where A1 is the top-most cell with data:
=COUNTIF($A$1:$A1,$A1)=1
For the detailed steps to create the rule, please see the following tutorial: Excel formulas for conditional formatting.
I have a spreadsheet where I am running a date in column B and I have set it up so that if an item isn't imputed into column H within two days, it turns Red. I have a formula =(TODAY()-B3)>2 and I wondered how I could copy it down each row below and have the cell reference change for each ie. B4, B5, B6, etc
Hello,
I have conditional formatting relying on a date where the cell is merged because I had to add another row in order to have the sub contractors listed separately. For example, I have rows 2 and 3 for a task and columns A, B, C, D, E, F, G, H, I, J, K, L, M, N, O and P are all merged however once you get to column Q, R, S, T, U they are no longer merged to show the distinction between the 2 different sub contractors on the task. Column V is merged again. My problem is Column I which is the expiration date of the task is the condition to turn all the cells to the color requested. Because column I is merged the first subcontractor in Row 2, Column Q, R, S, T, U will turn the color but the second sub contractor in Row 3, Column Q, R, S, T and U will not turn the color requested. It will only happen if I don't merge the Column I which has the expiration date and I put the date in both cells (2 and 3). PLEASE HELP IVE BEEN WORKING ON THIS FOR 3 DAYS!!!!!!
I get so frustrated with using conditional formatting to highlight cells. The way I work with spreadsheet data often involves cutting and pasting data from one cell to another and the conditional formatting quickly becomes garbled. If I have the formatting set to an entire column (ex: A:A), why on earth would it assume that if I cut and paste something from one cell to another within the column that I'd want the origin (now empty) cell to be unformatted (ex: cutting and pasting the contents of A6 to A7 leaves the conditional formatting with a new range of A1:A5,A7:1048576). Is there any way around this that I'm not realizing?
Hello Robert,
The only working way that I am aware of is to convert a range into an Excel table (Ctrl+T), and then use the columns' names rather than their addresses in the conditional formatting rules.
Hi Svetlana,
I need help please
I have a basic list of codes with their details (price-quantity bla bla bla) like:
FHQ110 400 300 15
FHQ220 500 100 20
FHQ221 140 60 4
Now when I make invoice (in other page of same worksheet) I will write the code manually, I need of Excel to find same code from the basic list and bring the details of it to write them beside the code in the invoice
automatically.
Thanks in Advance dear
opy formula then paste same cell no not change cell no
exp. =a5*c6+2
paste =a5*c7+2 but paste =A6*C7+2
how paste =a5*c7+2
copy formula then paste same cell no not change cell no
exp. =a5*c6+2
paste =a5*c7+2 but paste =A6*C7+2
how paste =a5*c7+2
I´ve read lots of info about this in different websites and yours was the only one that helped me solve my problem !
Thank you !
Hi Svetlana,
I have tables in a worksheet with multiple conditional formats (Yellow fill, bold type, strike through font and double underline). These conditional formats use both relative and fixed position references in the four formulas. Some cells will display no formating, others display 1, 2, 3 or even all four formats, based on the formulas. This part I have working correctly. What I want to do is count the total number of cells that have the each of the four formats separately. So a cell that is both yellow filled and bold will be counted for each conditional formatting rule. It would return a number in a separate cell for each conditional format counted. I found several VBA formulas, but none work so far.
Svetlana,
I am not sure if you have seen this issue yet.
I have an Excel 2010 worksheet that sets the color of each cell based on the text value contained in another.
Surplus is Green
=COUNTIFS('New Entry'!$A$11:$A$174,J2:J19,'New Entry'!$B$11:$B$174,"Surplus")
Turn In is Yellow
=COUNTIFS('New Entry'!$A$11:$A$174,J2:J19,'New Entry'!$B$11:$B$174,"Turn In")
Checked Out is Brown
=COUNTIFS('New Entry'!$A$11:$A$174,J2:J19,'New Entry'!$B$11:$B$174,"Checked Out")
Somehow the cell reference to $A$174 and $B$174 in my formulas are being automatically degraded to a lesser cell # For example, today my conditional formatting formula read:
=COUNTIFS('New Entry'!$A$11:$A$144,J2:J19,'New Entry'!$B$11:$B$144,"Checked Out")
Why is Excel changing my conditional formatting formulas?
hi, I would like to conditional format a column so that cells will red if they contain values greater than the cell directly above them.
Thanks
Hi Katie,
Assuming that row 2 is your first row with data, you can create a conditional formatting rule with a formula similar to this:
=$A3>$A2
HI,
Because there is duplicate Names in Column "Name" and I want to use SUMIF formula for each cell in col "mon" to "Fri"
where
Range is from A2 to A6,
criteria is "name in each row of Name column",
sum range is each column "Mon" and then "Tue" ..."Fri"
How do I do the formula with SUMIF in conditional format to set the color of each cells in Col "Mon" thru "Fri"?
Thanks,
Look Like it was missing some information:
If total <= 4, set color to orange
If total < 8, set color to yellow
If total = 8, set color to blue
If total is greater than 8, set color to green
Hi!
Select the rows you want to color, not including the header row and create the following rules:
Orange =SUM($C2:$G2)<=4
Yellow =AND(SUM($C2:$G2)>4, SUM($C2:$G2)<8)
Blue =SUM($C2:$G2)=8
Green =SUM($C2:$G2)>8
Hi,
I have a question:
If I have a table as follows:
ROW1: Name Tasks Mon Tue Wed Thu Fri
Row2: A clean 4.5 3.5 8 6 9
Row3 B Clerk 9 4 5.5 7 0
Row4: C Sale 5.5 7 6 8 1
Row5: A Sale 3.5 0.5 0 1 0
Row6: B Clean 0 0 0.5 0 0
How do I use conditional format to set the color to the cells in each column Mon to Fri with the condition as follows?
if total hours of each person in a day <= 4 set cell color to orange to each day's column
If total hours of each person in a day 8 set color to green
In this example, The person A has 8 hours in Mon and Row2 and Row5 of the COl "Mon" will be set to "Blue". The person B has total 9 hours in Mon, therefore, row2 and row6 set to Green. The person C has total 5.5, row4 should set to yellow. The condition format should be used for all rows and columns from Mon to Fri
Just so you know... the scrolling icons at the bottom of the page looks really swish but I find it so distracting that I can't read the page.
Hi Svetlana Cheusheva,
How we can apply condition formatting to the consolidate cell
hi Svetlana Cheusheva!
I need your expert help and also of other members as well.
I am unable to solve a problem regarding below situation;
I wanna know how to arrange multiple columns with huge data in such a way that first column's value would set in front of the next column if the values can find equal match in front of each other in a row otherwise the value would remain blank if it doesn't find its required same data .
suppose i have numeric data and also other,if A:100 has a value 42001234 and column B has 42001234 in B386 then it could be arranged via sorting or other method but can we place or arrange them via technique or formula ?
Please answer this question (I have to learn VBA, but for now walk me through baby steps without coding).
I have a list in Column A with about 2500 different names. 1k are highlighted green, 500 red, 500 orange, the remaining blank.
I recieve a different list with some names that match my original column A list. I want to see if the name in the cell in column b, matches with column A, and if it is highlighted(I highlighted manually as I progressed, not using any conditional) I want the new column, column C to show that name but now highlighted.
Currently I use a VLOOKUP(B2,$A:$A,1,FALSE) and that returns the name of column B if it is in A however no color value is shown. I need to know which are not highlighted so I know which ones do not match or need to be "colored in"
Can anyone help with this?
E.G.
Currently:
A B C
BYD HILIT G* BYD*Plain* BYD *Plain*
GYD HILIT R* LUH *Plain LUH *Plain
HIJ *BLANK* DOL *Plain* #N/A
LUH HILIT G* GYD *Plain GYD *Plain*
WANT:
A B C
BYD HILIT G* BYD*Plain* BYD HILIT G*
GYD HILIT R* LUH *Plain LUH HILIT G*
HIJ *BLANK* DOL *Plain* #N/A
LUH HILIT G* GYD *Plain GYD HILIT R*
Hi,
My question is how to do a conditional formatting where I have to select multiple cells in a row and if those conditions are not met then the cells below either row or column need to be changed in color code.
I understand excel does not allow multiple absolute referencing. Is there any formula through conditional formatting for this.
Ex: The cells I selected are say E5 to I5 ( E5, F5, G5, H5, I5). These cells have the letter H to L.
Now I want to conditional format to a color red when the cells below ($E$7:$I$20) are blank and say orange if the value is either more or less than the referenced cell, green if it matches
I want the formula for this or an alternate method only through conditional formatting. The excel I am working is quite monstrous.
Thanks in advance.
Hi!
Since you need to lock a row, you should use a relative column (without $) and absolute row (with $) references. Try creating the rules with the following formula:
Red (it should come 1st in the list of rules with the "Stop if true" option checked): =E$7=""
Green: =E$7=E$5
Orange: =E$7<>E$5
You write the formula for the left-most cell but apply the rules to all cells you want to highlight (e.g. E5:I5).
Thanks will give that a try.
Have loads of questions though will pose them as I come across.
thank you so-much you are great.
I need to figure out how to get a conditional format of duplicate values in excel. So for example I have column A and column B. Each column has numbers in them, but I ONLY want duplicates that are in B to highlight in A. Right now if I do the basic conditional format of duplicates it shows all duplicates that are in A and B (A has duplicates within it's own and I don't want those highlighted)
Example
Column A
32
45
65
32
76
43
45
78
Column B
100
98
43
54
96
37
I only want 43 to be highlighted, and it can be in either column, I just don't want the duplicate ones within the same column highlighted. Is that possible?
How to create a condition like this: I want to count the number of cells of a range (let's say B1:B20) whose values are 10% of another cell, let's say B32.
Hi Ahmad,
You can use the following array formula (remember to press Ctrl+Shift+Enter to get it to work correctly):
=SUM(--(B1:B20=B32*0.1)*(B1:B20<>0))
Please note that the formula counts cells in B1:B20 that are exactly 10% of B32. If you want, say 10% or less, then change the condition to B1:B20<=B32*0.1
1What is the code used to reference the cell in the eleventh column and fortieth row?
Hi Svetlana, quick question for you if you have a moment.
I have a worksheet with conditional formatting down an entire column, delineated simply as $K:$K. However, as part of my team's process, we are constantly inserting new rows into the top of the range, and it's causing my Conditional Formatting rules to duplicate, with one set continuing the $K:$K applies, but the duplicates to apply only to the inserted range.
Is there a way I can prevent that, either at setup or with a process change to how we insert our rows?
Thanks so much!
Did you ever find a solution to this problem?
Dear Svetlana,
I managed to do my conditional formatting on 4 columns next to each other in the same row but it only works with absolute row and column or with relative row and absolute column. If I have a relative column and absolute row it colors only 2 (first and last) of the 4 columns and if I change both to relative then it only colors the first column.
Of course it would be handy to have both relative so that I can easily copy the cells. Also the copying works perfectly vertically (since the row is relative) but I want to make it work horizontally too.
It would be perfect if you could help me :) Thanks
Hai
Pls give solution for the following question
Pipe Bend
200 15
200 30
250 15
300 60
400 45
500 15
How many bends in 200 category? I tried COUNTIFS(Pipe,200,Bend)
Regards
Joseph
Hello Joseph,
Since you want to sum bends by categories, you need a function that sums based on a condition(s), i.e. the SUMIF function:
=SUMIF(A2:A100,"200",B2:B100)
Where A2:A100 is the Pipe column and B2:B100 – the Bend column.