Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Merge an entire row
Hi Guy,
Try: Sub Macro1() Dim r As Long Dim rng As Range r = 2 Set rng = Rows(r) rng.MergeCells = True End Sub --- Regards, Norman "Joe" wrote in message ... Hi all How do I use the range object (vba) to merge an entire row (lets say row r). TIA Guy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Merge an entire row
Hi Stuart,
Sub Macro2() Dim r As Long Dim rng As Range r = 10 Set rng = Cells(r, 1).Resize(1, 4) rng.MergeCells = True End Sub --- Regards, Norman "Joe" wrote in message ... Thanks Norman. What if I know the row (r) And I want to merge only the first four columns (e.g merge A10 to D10) Again - I have the row number r. TIA Guy "Norman Jones" wrote in message ... Hi Guy, Try: Sub Macro1() Dim r As Long Dim rng As Range r = 2 Set rng = Rows(r) rng.MergeCells = True End Sub --- Regards, Norman "Joe" wrote in message ... Hi all How do I use the range object (vba) to merge an entire row (lets say row r). TIA Guy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Merge an entire row
Hi all
How do I use the range object (vba) to merge an entire row (lets say row r). TIA Guy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Merge an entire row
Thanks Norman.
What if I know the row (r) And I want to merge only the first four columns (e.g merge A10 to D10) Again - I have the row number r. TIA Guy "Norman Jones" wrote in message ... Hi Guy, Try: Sub Macro1() Dim r As Long Dim rng As Range r = 2 Set rng = Rows(r) rng.MergeCells = True End Sub --- Regards, Norman "Joe" wrote in message ... Hi all How do I use the range object (vba) to merge an entire row (lets say row r). TIA Guy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Zip codes in mail merge - first digit doesn't display in merge | Excel Discussion (Misc queries) | |||
Remove Merge and Center for entire spreadsheet | Excel Worksheet Functions | |||
mail merge excludes my headers and critical data in Word merge | Excel Discussion (Misc queries) | |||
Merge =( formula should retain fraction type numbers after merge. | Excel Worksheet Functions | |||
how do i get my mail merge to update the data source at each merge | Excel Discussion (Misc queries) |