![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
I would like to change the color of a whole line based on a cell value, I used conditional format and was able to get the cell to change color but I would like to get the whole line that color, e.g. Cell f1 = cash then a1:q1 yellow, f1= warranty then a1:q1 = green, So I can visually look through many lines and see. If there is a way to do this with the conditional format please explain as I have not figured it out yet, IF this is to be done with VBA please be detailed as I am just learning it. Any help that you may be able to offer is greatly appreciated.
Thank you all |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
Select all the cells you want to be coloured (entire row if wanted). Then click on Format- Conditional Formatting and enter this as a formula: -
=$F$1="Warranty" Select your formatting and then do the same for your "cash" entry. |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
Thank you that worked, One more question regarding this,, is there an easier way to have this conditional format for each row than to do a new conditional for each, e.g.
I have the two conditions cash and warranty yellow and green for a3:q3 based on g3 and i want this to be the conditions on each line in a4:q4 through a50:q50. Do i need to do the conditional format on each line or can I just say if g4 use g3 conditional or soemthing like that. Thank you |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
Select the rows or area that you want to be coloured, go through the above, but this time enter: -
=$G3="Warranty" where 3 is the starting row for your area. Because we're now using relative row references, this will colour each line in your selection when the condition is met. |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
the =g3="warranty" even though I select a3:q3 only colors a3 so I went back to the $G$3 however, that isnt fixing my secondary problem.
I want a3:q3 to color yellow and green based on g3 being cash and warranty. which you have solved for me, again thank you i was getting so frustrated. I want a4:q4 to color the same based on g4 and so on through a53:q53 based on g5,6, etc. Is there an easy way to do it or do i need to highlight a4:q4 click conditional format then =$G$4="cash" yellow and condition 2 green for each line Thank you in advance |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
Im sorry, I either misread your =$g3="warranty" or typed it in wrong, That in fact did it the way I want, Thank you
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|