Link to home
Start Free TrialLog in
Avatar of allelopath
allelopath

asked on

Select Range of Label + 1

Currently I have:
ActiveSheet.Range("myLabel:P74").Select
But I really want one row below myLabel, ie if myLabel is cell P2, I want P3
Below code doesn't work.
ActiveSheet.Range("myLabel + 1:P74").Select

How do I do this?

(there is a plus sign after myLabel in the 2nd code statement, not showing up in the preview for some reason)
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Hello allelopath,

Couldn't do it easily ... myself but the following should work:

ActiveSheet.Range("myLabel").offset(1,0).resize(74 - ActiveSheet.Range("myLabel").row, columns("P").column - ActiveSheet.Range("myLabel").column + 1).select

Regards,
Chris
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Chris, what happened?

Double :)
I was trying to get to:

ActiveSheet.Range(ActiveSheet.Range("myLabel").Offset(1, 0), "p74").Select

BUt couldn't quite see my way to it ... and neither did you I think ... 1/2 :)

Chris
chris_bottomley said:
>>and neither did you I think

Nope, neither did I.  Guess I should keep my sarcasm to myself in the future :)
Nah ... we gotta take our pleasures where we can!  ANd in response to the riposte that Sarcasm is the lowest form of wit I reply that it' is however appropriate for the lowest form of life ... to whit me.

Look Kevin Lots of ellipses!

Chris
allelopath,

Glad to help!  Depending on your situation, Chris's amendment to my approach might have been more
appropriate.  If so, I would have no objection at all if you asked the Mods t reopen the question so you
could reenter it as a split.

Regards,

Patrick