Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could use index values rather than the A1 convention
In the sub below, first the values in B2:E2 are displayed, then the ranges B3:B5, C3:C5, D3:D5 and E3:E5 are given a colour fill Sub tryme() For J = 2 To 5 MsgBox Worksheets("Sheet1").Cells(2, J) Set myrange = Worksheets("Sheet1").Range(Cells(3, J), Cells(5, J)) myrange.Interior.ColorIndex = J + 5 Next J End Sub hope this helps -- Bernard Liengme http://people.stfx.ca/bliengme Microsoft Excel MVP "HarryGuy" wrote in message ... Windows XP and Excel 2003 The first time through the program should read: With Active Sheet .First = Sheets("Rates").Range("B2") .Second = Sheets("Rates").Range("B3:B186") End With The next time through the Ranges should read "C2" and "C3:C186" Then next time "D2" and "D3:D186" and so on until it reaches "X2"and "X3:X186" Can someone suggest a good way to do this. Please. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Increasing Row Value | Excel Programming | |||
Increasing the Sheet # | Excel Programming | |||
Increasing the row count | Excel Programming | |||
Increasing by a percent | Excel Discussion (Misc queries) | |||
Increasing M in M/D/Y | Excel Discussion (Misc queries) |