Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Select Range - using Offset ( 40 ,0 ) - not working

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Select Range - using Offset ( 40 ,0 ) - not working

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..


---
Regards,
Norman



"Buffyslay" wrote in message
m...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Select Range - using Offset ( 40 ,0 ) - not working

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Select Range - using Offset ( 40 ,0 ) - not working

Hi Buffyslay,

If n = 40, what is the address of the intended selection range?


---
Regards,
Norman



wrote in message
...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Select Range - using Offset ( 40 ,0 ) - not working

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OFFSET() not working within a SUMPRODUCT() when refering to a range in a pivot table Conan Kelly Excel Worksheet Functions 6 April 11th 07 12:32 AM
range("a1").select not working tkaplan Excel Discussion (Misc queries) 3 October 27th 05 06:16 PM
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM
Select and Copy Range using Offset jondorv Excel Programming 1 May 16th 04 05:23 PM
Range().Select Not Working Chip Pearson Excel Programming 1 December 12th 03 02:21 PM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"