Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all, and good morning!
im celebrating today cause its my Birthday! anyway, could anyone please help? i want to search through column "P" and if the value is "TRUE" i would like to change the colour of the row, i have the following so far With ????? .Interior .ColorIndex = 44 .Pattern = xlSolid End With please help. Thank you, Robert Couchman ) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert
why don't you sue conditional formating? but you may try the following Dim rng as range Dim cell as range set rng = Range("P:P") for each cell in rng if cell.value = True then cell.interior.colorindex=3 end if next -- Regards Frank Kabel Frankfurt, Germany Robert Couchman wrote: Hello all, and good morning! im celebrating today cause its my Birthday! anyway, could anyone please help? i want to search through column "P" and if the value is "TRUE" i would like to change the colour of the row, i have the following so far With ????? .Interior .ColorIndex = 44 .Pattern = xlSolid End With please help. Thank you, Robert Couchman ) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for that,
but the code i need is to change the entire rows colour as some of the cells including this may be hidden on a print report! anyone please help?? Robert Couchman ) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert
for the entire row change cell.interior.colorindex=3 to cell.entirerow.interior.colorindex=3 -- Regards Frank Kabel Frankfurt, Germany "Robert Couchman" schrieb im Newsbeitrag ... Thank you for that, but the code i need is to change the entire rows colour as some of the cells including this may be hidden on a print report! anyone please help?? Robert Couchman ) |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Robert,
Here is an amendment Dim rng as range Dim cell as range set rng = Range("P:P") for each cell in rng if cell.value = True then cell.entirerow.interior.colorindex=3 end if next but you would be better to use CF as Frank suggests, otherwise the row stays that colour even if the data changes. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Robert Couchman" wrote in message ... Thank you for that, but the code i need is to change the entire rows colour as some of the cells including this may be hidden on a print report! anyone please help?? Robert Couchman ) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change the colour | Excel Worksheet Functions | |||
Change cell colour | Excel Discussion (Misc queries) | |||
HOW TO CHANGE ROW COLOUR | New Users to Excel | |||
change a cell background colour to my own RGB colour requirements | Excel Discussion (Misc queries) | |||
Change Sheet Tab Colour | Excel Discussion (Misc queries) |