Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to assign a variable in a range select

I tried to assign a variable for a cell range and it returns with an error.
Thanks.

ActiveCell.Offset(0, 1).Select
Range("ActiveCell.Offset(0, 0):ActiveCell.Offset(0, 4)").Select........this
code does not work



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default How to assign a variable in a range select

ActiveCell.Offset(0, ,4).Select

--
HTH

Bob Phillips

"Paul" wrote in message
...
I tried to assign a variable for a cell range and it returns with an

error.
Thanks.

ActiveCell.Offset(0, 1).Select
Range("ActiveCell.Offset(0, 0):ActiveCell.Offset(0,

4)").Select........this
code does not work





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default How to assign a variable in a range select

You are soooooo close:

Range(ActiveCell.Offset(0, 0).Address & ":" & ActiveCell.Offset(0,
4).Address).Select

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Paul" wrote in message
...
I tried to assign a variable for a cell range and it returns with an error.
Thanks.

ActiveCell.Offset(0, 1).Select
Range("ActiveCell.Offset(0, 0):ActiveCell.Offset(0,
4)").Select........this code does not work





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to assign a variable in a range select

No Luck...Does not work

ActiveCell.Offset(0, 1).Select........Need this one to establish the new
location
Range("ActiveCell.Offset(0, 0):ActiveCell.Offset(0, 4)").Select....then I
need to highlight the cell from above plus 4 cells to the right

"Bob Phillips" wrote in message
...
ActiveCell.Offset(0, ,4).Select

--
HTH

Bob Phillips

"Paul" wrote in message
...
I tried to assign a variable for a cell range and it returns with an

error.
Thanks.

ActiveCell.Offset(0, 1).Select
Range("ActiveCell.Offset(0, 0):ActiveCell.Offset(0,

4)").Select........this
code does not work







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to assign a variable in a range select

Thanks...It is working

"George Nicholson" wrote in message
...
You are soooooo close:

Range(ActiveCell.Offset(0, 0).Address & ":" & ActiveCell.Offset(0,
4).Address).Select

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Paul" wrote in message
...
I tried to assign a variable for a cell range and it returns with an
error. Thanks.

ActiveCell.Offset(0, 1).Select
Range("ActiveCell.Offset(0, 0):ActiveCell.Offset(0,
4)").Select........this code does not work









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default How to assign a variable in a range select

Another way...

activecell.resize(1,5).select



Paul wrote:

I tried to assign a variable for a cell range and it returns with an error.
Thanks.

ActiveCell.Offset(0, 1).Select
Range("ActiveCell.Offset(0, 0):ActiveCell.Offset(0, 4)").Select........this
code does not work


--

Dave Peterson
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
Select a variable range Bluecat Excel Worksheet Functions 7 January 13th 09 01:24 AM
Use a Variable to select a range Connie Excel Discussion (Misc queries) 3 October 19th 06 05:48 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Discussion (Misc queries) 1 March 9th 05 11:41 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Worksheet Functions 3 March 9th 05 11:40 PM
Range.Select with variable cells ? [email protected] Excel Programming 2 October 29th 03 08:43 PM


All times are GMT +1. The time now is 11:24 AM.

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

About Us

"It's about Microsoft Excel"