Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combining 2 Ranges in a Single WITH Statement
I am formatting a totals column and a totals row with exactly the same set
of formats. Currently I use these two 'with' statements: With .Range(.Cells(mRow + 1, 1), .Cells(mRow + 1, 6)) With .Range(.Cells(6, 6), .Cells(mRow, 6)) Since the formatting statements in each 'with' block are identical, I think there must be a way to combine those into a single 'with' block. Can anyone let me know if that can be done, and, if so, what that the 'with' statement would look like? thanks, Ken Loomis |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combining 2 Ranges in a Single WITH Statement
with union(range1, range2)
.... end with Tim "Ken Loomis" wrote in message ... I am formatting a totals column and a totals row with exactly the same set of formats. Currently I use these two 'with' statements: With .Range(.Cells(mRow + 1, 1), .Cells(mRow + 1, 6)) With .Range(.Cells(6, 6), .Cells(mRow, 6)) Since the formatting statements in each 'with' block are identical, I think there must be a way to combine those into a single 'with' block. Can anyone let me know if that can be done, and, if so, what that the 'with' statement would look like? thanks, Ken Loomis |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combining 2 Ranges in a Single WITH Statement
Thanks, Tim.
"Tim Williams" <saxifrax@pacbell*dot*net wrote in message ... with union(range1, range2) ... end with Tim "Ken Loomis" wrote in message ... I am formatting a totals column and a totals row with exactly the same set of formats. Currently I use these two 'with' statements: With .Range(.Cells(mRow + 1, 1), .Cells(mRow + 1, 6)) With .Range(.Cells(6, 6), .Cells(mRow, 6)) Since the formatting statements in each 'with' block are identical, I think there must be a way to combine those into a single 'with' block. Can anyone let me know if that can be done, and, if so, what that the 'with' statement would look like? thanks, Ken Loomis |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combining different charts on a single chart | Charts and Charting in Excel | |||
Combining several cells into single equasion? | Excel Worksheet Functions | |||
Combining Ranges | Excel Worksheet Functions | |||
Combining like worksheets into a single worksheet | Excel Worksheet Functions | |||
Combining Two Ranges | Excel Programming |