ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   highlight alternate row in excel (https://www.excelbanter.com/excel-programming/416027-highlight-alternate-row-excel.html)

gopal

highlight alternate row in excel
 
Dear Friends,

i would like to have a command or vba-code for highlighting alternate
row.
e.g. a1..h1, a3...h3, a5...h5, a7...h7

thanks

JLGWhiz

highlight alternate row in excel
 
See if this helps:

http://office.microsoft.com/en-us/ex...CL100570551033

"gopal" wrote:

Dear Friends,

i would like to have a command or vba-code for highlighting alternate
row.
e.g. a1..h1, a3...h3, a5...h5, a7...h7

thanks


Mike Fogleman[_2_]

highlight alternate row in excel
 
Since you are not doing an entire row, consider this method by Chip Pearson:

http://www.cpearson.com/excel/banding.htm

Mike F
"gopal" wrote in message
...
Dear Friends,

i would like to have a command or vba-code for highlighting alternate
row.
e.g. a1..h1, a3...h3, a5...h5, a7...h7

thanks




Gary Keramidas

highlight alternate row in excel
 
here is some code that will do what you want

Sub banding()
Dim i As Long
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
For i = 1 To 5 Step 2
ws.Range("A" & i & ":H" & i).Interior.ColorIndex = 37
Next
End Sub

--


Gary


"gopal" wrote in message
...
Dear Friends,

i would like to have a command or vba-code for highlighting alternate
row.
e.g. a1..h1, a3...h3, a5...h5, a7...h7

thanks





All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com