Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cannot select rows in VBA
I am trying to find a way to select rows via VBA using the macro below
but when Rows("6:11").Select is executed it selects rows 3 to 18. Does someone know how I could select the row 6 to 11 via VBA. Sub Macro1() ' ' Macro1 Macro ' ' Range("B3:B18").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Selection.Merge Rows("6:11").Select End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Cannot select rows in VBA
Merged cells behave weirdly.
Can you eliminate the merged cells? wrote: I am trying to find a way to select rows via VBA using the macro below but when Rows("6:11").Select is executed it selects rows 3 to 18. Does someone know how I could select the row 6 to 11 via VBA. Sub Macro1() ' ' Macro1 Macro ' ' Range("B3:B18").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Selection.Merge Rows("6:11").Select End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can i randomly select 780 rows from 4000 rows of data | Excel Worksheet Functions | |||
Select always same Rows range | Excel Discussion (Misc queries) | |||
select rows | Excel Worksheet Functions | |||
Select rows, then sort | Excel Discussion (Misc queries) | |||
Unable to select rows in the repeat rows on top option | Excel Discussion (Misc queries) |