Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() -- 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
|
|||
|
|||
![]()
Sub rangefinder()
Dim rng As Range Set rng = Range(ActiveCell, Cells(Rows.Count, 1).End(xlUp)) MsgBox rng.Address 'do something with rng End Sub Gord Dibben MS Excel MVP On Mon, 15 Mar 2010 15:23:02 -0700, Aussie Bob C wrote: |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gordon
Sorry about double post. I require the range to include across to Column M. My second post states that. -- Thank you Aussie Bob C Little cost to carry knowledge with you. Win XP P3 Office 2007 on Mini Mac using VMware. "Gord Dibben" wrote: Sub rangefinder() Dim rng As Range Set rng = Range(ActiveCell, Cells(Rows.Count, 1).End(xlUp)) MsgBox rng.Address 'do something with rng End Sub Gord Dibben MS Excel MVP On Mon, 15 Mar 2010 15:23:02 -0700, Aussie Bob C wrote: . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Note that you don't generally have to select something to work on it.
I'm just selecting for clarity. This macro selects A to M from activecell row and down to last row. Does not matter which column has activecell. Sub rangefinder() Dim rng As Range Dim lRow As Long Set rng = Range(ActiveCell, Cells(Rows.Count, 1).End(xlUp)) rng.Resize(, 13).Select End Sub This macro selects from activecell in Column A to M and down to lastrow. Sub rangefinder22() Dim lRow As Long With ActiveSheet lRow = .Range("A" & Rows.Count).End(xlUp).Row .Range(ActiveCell.Address & ":M" & lRow).Select End With End Sub Gord On Mon, 15 Mar 2010 17:06:01 -0700, Aussie Bob C wrote: Hi Gordon Sorry about double post. I require the range to include across to Column M. My second post states that. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gord
Thank you for your 2nd post Sorry again for my second post. It's a pity a poster can't edit his own post within say the first 15 minutes. Then after that 15 minutes the post appears in the main question list. i.e. a small lag time. -- Thank you Aussie Bob C Little cost to carry knowledge with you. Win XP P3 Office 2007 on Mini Mac using VMware. "Gord Dibben" wrote: Note that you don't generally have to select something to work on it. I'm just selecting for clarity. This macro selects A to M from activecell row and down to last row. Does not matter which column has activecell. Sub rangefinder() Dim rng As Range Dim lRow As Long Set rng = Range(ActiveCell, Cells(Rows.Count, 1).End(xlUp)) rng.Resize(, 13).Select End Sub This macro selects from activecell in Column A to M and down to lastrow. Sub rangefinder22() Dim lRow As Long With ActiveSheet lRow = .Range("A" & Rows.Count).End(xlUp).Row .Range(ActiveCell.Address & ":M" & lRow).Select End With End Sub Gord On Mon, 15 Mar 2010 17:06:01 -0700, Aussie Bob C wrote: Hi Gordon Sorry about double post. I require the range to include across to Column M. My second post states that. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
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 range next to activecell | Excel Programming | |||
Select Activecell in Range | Excel Programming |