Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Use xldown to select a range of cells
Hiya,
When I run the macro using this code: Range("A4:R4").Select Selection.End(xlDown).Activate Selection.Copy Only the bottom left cell is being selected. I need the whole range to be selected. Can anyone help please? Thanks merry_fay |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Use xldown to select a range of cells
Hi ,
if you always want to select A4 to R4 just use Range("A4:R4").Select "merry_fay" wrote: Hiya, When I run the macro using this code: Range("A4:R4").Select Selection.End(xlDown).Activate Selection.Copy Only the bottom left cell is being selected. I need the whole range to be selected. Can anyone help please? Thanks merry_fay |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Use xldown to select a range of cells
OPPs
, I sent the message before finishing if you want to select from A4 up to the last row used in R Sub Macro1() ' ' Macro1 Macro ' Dim myrange, MyRange1 As Range lastRow = Cells(Rows.Count, "A").End(xlUp).Row Set myrange = Sheets("Sheet1").Range("A4:R" & lastRow) myrange.Copy End Sub if this helps please click yes, thanks "Eduardo" wrote: Hi , if you always want to select A4 to R4 just use Range("A4:R4").Select "merry_fay" wrote: Hiya, When I run the macro using this code: Range("A4:R4").Select Selection.End(xlDown).Activate Selection.Copy Only the bottom left cell is being selected. I need the whole range to be selected. Can anyone help please? Thanks merry_fay |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Use xldown to select a range of cells
Generally speaking you are better to use xlup from the bottom (which stops at
the last complete cell of the worksheet) than xldown (which stops at the first blank). in either case you don't need to select Range(Range("A4"), Cells(Rows.Count, "A").End(xlUp)).Copy 'or Range(Range("A4"), Range("A4").End(xlDown)).Copy -- HTH... Jim Thomlinson "merry_fay" wrote: Hiya, When I run the macro using this code: Range("A4:R4").Select Selection.End(xlDown).Activate Selection.Copy Only the bottom left cell is being selected. I need the whole range to be selected. Can anyone help please? Thanks merry_fay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When entering data into a range of cells, select the entire range. | Excel Discussion (Misc queries) | |||
End(xlDown) not working? | Excel Discussion (Misc queries) | |||
Select a range but only sum the cells in a certain colour? | Excel Worksheet Functions | |||
Select Range of Cells | Excel Discussion (Misc queries) | |||
select a range using "cells()" | Excel Worksheet Functions |