I need to select a range from the active cell 16 rows down and a variable
number of columns to the left. I've named my variable "MyMonths", but I'm
not sure how to incorporate it into a range address.
I need to select a range from the active cell 16 rows down and a variable
number of columns to the left. I've named my variable "MyMonths", but I'm
not sure how to incorporate it into a range address.
Nevermind. I answered my own question.
ActiveCell.Range(Cells(1, 1), Cells(16, MyMonths)).Select
"StephanieH" wrote:
> I need to select a range from the active cell 16 rows down and a variable
> number of columns to the left. I've named my variable "MyMonths", but I'm
> not sure how to incorporate it into a range address.
>
>
>
Define "variable number of columns to the left". Back to Column A or ??? If
Column A then...
dim rngTo Select as range
dim wks as worksheet
set wks = activesheet
set rngtoSelect = wks.range(activecell, .cells(activecell.row + 16, "A"))
rngtoselect.select
--
HTH...
Jim Thomlinson
"StephanieH" wrote:
> I need to select a range from the active cell 16 rows down and a variable
> number of columns to the left. I've named my variable "MyMonths", but I'm
> not sure how to incorporate it into a range address.
>
>
>
Activecell.Offset().MyMonths).Resize(16,MyMonths).Select
--
HTH
RP
(remove nothere from the email address if mailing direct)
"StephanieH" <StephanieH@discussions.microsoft.com> wrote in message
news:E3D8DC55-F5B9-4823-B806-7B1B8371A113@microsoft.com...
> I need to select a range from the active cell 16 rows down and a variable
> number of columns to the left. I've named my variable "MyMonths", but I'm
> not sure how to incorporate it into a range address.
>
>
>
I thought I had it before, but only close.
It's working now. Thanks Bob and Jim.
"Bob Phillips" wrote:
> Activecell.Offset().MyMonths).Resize(16,MyMonths).Select
>
> --
>
> HTH
>
> RP
> (remove nothere from the email address if mailing direct)
>
>
> "StephanieH" <StephanieH@discussions.microsoft.com> wrote in message
> news:E3D8DC55-F5B9-4823-B806-7B1B8371A113@microsoft.com...
> > I need to select a range from the active cell 16 rows down and a variable
> > number of columns to the left. I've named my variable "MyMonths", but I'm
> > not sure how to incorporate it into a range address.
> >
> >
> >
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks