Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("A10:M" & Range("A10000").End(xlUp).Row.Cut
will cut a range from Cell A10 across to Column M and down to last cell in Column A How do you replace reference to Cell A10 with ActiveCell in Column A? -- Thank you Aussie Bob C Little cost to carry knowledge with you. Win XP P3 Office 2007 on Mini Mac using VMware. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim lRow as long
Dim myRange as Excel.range Dim aWS as excel.worksheet set aWS = activesheet Set myRange = aws.Range("A10") lRow = aws.cells(aws.rows.count,myrange.row).end(xlup).ro w set myrange = myrange.resize(lrow-myrange.row + 1,13) debug.print myrange.address -- HTH, Barb Reinhardt "Aussie Bob C" wrote: Range("A10:M" & Range("A10000").End(xlUp).Row.Cut will cut a range from Cell A10 across to Column M and down to last cell in Column A How do you replace reference to Cell A10 with ActiveCell in Column A? -- Thank you Aussie Bob C Little cost to carry knowledge with you. Win XP P3 Office 2007 on Mini Mac using VMware. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My mention of cell A10 was an example used in the code.
The ActiveCell could be any Column A cell the user selects. The range selected from ActiveCell down to last cell containing data in Column A and include cells straight across to Column M. Column M may be shorter than A but never longer. My problem is coding a substitute an ActiveCell for A10 in codecode. -- Thank you Aussie Bob C Little cost to carry knowledge with you. Win XP P3 Office 2007 on Mini Mac using VMware. "Barb Reinhardt" wrote: Dim lRow as long Dim myRange as Excel.range Dim aWS as excel.worksheet set aWS = activesheet Set myRange = aws.Range("A10") lRow = aws.cells(aws.rows.count,myrange.row).end(xlup).ro w set myrange = myrange.resize(lrow-myrange.row + 1,13) debug.print myrange.address -- HTH, Barb Reinhardt "Aussie Bob C" wrote: Range("A10:M" & Range("A10000").End(xlUp).Row.Cut will cut a range from Cell A10 across to Column M and down to last cell in Column A How do you replace reference to Cell A10 with ActiveCell in Column A? -- Thank you Aussie Bob C Little cost to carry knowledge with you. Win XP P3 Office 2007 on Mini Mac using VMware. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range(ActiveCell, "M" & Cells(Rows.Count, "A").End(xlUp).Row).Cut
OR if the active cell is not in ColA Range("A" & ActiveCell.Row & ":M" & Cells(Rows.Count, "A").End(xlUp).Row).Cut -- Jacob "Aussie Bob C" wrote: Range("A10:M" & Range("A10000").End(xlUp).Row.Cut will cut a range from Cell A10 across to Column M and down to last cell in Column A How do you replace reference to Cell A10 with ActiveCell in Column A? -- Thank you Aussie Bob C Little cost to carry knowledge with you. Win XP P3 Office 2007 on Mini Mac using VMware. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select range from ActiveCell do to Lastcell in ColumnA | Excel Programming | |||
Select range from ActiveCell do to Lastcell | Excel Programming | |||
Select range of cells in column AS based upon lastcell in col A. | Excel Programming | |||
ActiveCell.Row in Range().Select? | Excel Programming | |||
Select Activecell in Range | Excel Programming |