Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
color multiple rows
Hi,
Can someone help me out with the following problem: In comlumn A the macro has to look for the value "0". Everytime this value is found this row and the row below have to be coloured. Someone? Thank in advance. Bernd |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
color multiple rows
Hi
Try this: Sub ColorRows() FirstRow = 1 LastRow = Range("A" & Rows.Count).End(xlUp).Row For r = FirstRow To LastRow If Cells(r, "A").Value = "0" Then Rows(r).Resize(2).Interior.ColorIndex = 6 End If Next End Sub Best regards, Per On 28 Apr., 15:43, bernd wrote: Hi, Can someone help me out with the following problem: In comlumn A the macro has to look for the value "0". Everytime this value is found this row and the row below have to be coloured. Someone? Thank in advance. Bernd |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
color multiple rows
This is exactly how I meant it.
Thank you Per! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting characters in multiple rows when rows meet specific criteria | Excel Worksheet Functions | |||
Color alternate rows when after hiding selected rows | Excel Worksheet Functions | |||
How do I sort my data by color? (color applied to rows) | Excel Worksheet Functions | |||
Copying multiple rows to other worksheets (but amount of rows varies) - How? | Excel Discussion (Misc queries) | |||
Find all rows of a color and copy those rows to a new worksheet | Excel Programming |