Operating System - Microsoft
1753519 Members
4959 Online
108795 Solutions
New Discussion юеВ

How to Color empty row in Excel for alternative 5 rows.

 
Venkat Kishore Gangavar
Occasional Contributor

How to Color empty row in Excel for alternative 5 rows.

Hi, I have 500 rows in my excel sheet. I have a macro to insert one empty row for each 5 consecutive rows.I inserted empty rows using that. I would like to have another macro to fill that empty row with color. If is there any macro to insert the empty row and as well as giving the color for same.
2 REPLIES 2
Andras Ordogh
Valued Contributor

Re: How to Color empty row in Excel for alternative 5 rows.

hello,

so you just want to fill rows with color?
maybe you need this:
Rows("x:y").Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With

(this macro fill the 520. row. clor 3 = red)

andras
Andras Ordogh
Valued Contributor

Re: How to Color empty row in Excel for alternative 5 rows.

hello,

so you just want to fill rows with color?
maybe you need this:
Rows("x:y").Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With

(this macro fill x.row to y row. color 3 = red)

andras