Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Microsoft
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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