Select Range - using Offset ( 40 ,0 ) - not working

  • Thread starter Thread starter Buffyslay
  • Start date Start date
B

Buffyslay

hi there

having a real blonde moment - i need to
(n is already defined)

ActiveSheet.Range("E9").Activate
ActiveCell.Offset(0, n).Select

then select activecell(down 40, 0)
not move, basically if
n = 2

ActiveSheet.Range("E9").Activate
ActiveCell.Offset(0, 2).Select
range(F9:F40).select


please help - really dumb today

thanks
 
Hi Buffyslay,

Try:

Range("E9")(1,2).resize(32).Select

It is, however, rarely necessary to select a range and it is invariably
more efficient not to do so..
 
hi there

what i needed to do was

ActiveSheet.Range("E9").Activate
ActiveCell.Offset(0, n).Select
ActiveCell.Range("A1:A250").Select

where the the A1 actually refers to the active cell not the actual call
A1! odd behaviour i know

but thanks for the reply


_________________________________________

Willow: "I knew it! I knew it! Well, not in the sense of having the
slightest idea, but I knew there was something I didn't know."

http://www.buffyslay.co.uk
 
what i needed to do was
ActiveSheet.Range("E9").Activate
ActiveCell.Offset(0, n).Select
ActiveCell.Range("A1:A250").Select

n = 250 in this example - yes i should have put

ActiveCell.Range("A1:A40").Select
but i was copying it from my actual workings....


_________________________________________

Willow: "I knew it! I knew it! Well, not in the sense of having the
slightest idea, but I knew there was something I didn't know."

http://www.buffyslay.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top