Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a variable Range

Hi everyone,

I am having issues selecting a variable range. This is basic but I am
not a heavy user of VBA.

p = Range("startdate").Value
q = Range("enddate").Value


Sheets("Data-Sales w Macro").Select
Range("G29").Offset(0, p).Select

I am attempting to select the range between and including P and Q. P
and Q are drop down boxes. The code above selects the cell from
startdate, but my problem is the rest. Sorry for the easy question.
I appreciate your answers.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Selecting a variable Range

Maybe????

p = Range("startdate").Value
q = Range("enddate").Value

Sheets("Data-Sales w Macro").Select
range(Range("G29").Offset(0, p),range("g29").offset(0,q)).select



Brett wrote:

Hi everyone,

I am having issues selecting a variable range. This is basic but I am
not a heavy user of VBA.

p = Range("startdate").Value
q = Range("enddate").Value

Sheets("Data-Sales w Macro").Select
Range("G29").Offset(0, p).Select

I am attempting to select the range between and including P and Q. P
and Q are drop down boxes. The code above selects the cell from
startdate, but my problem is the rest. Sorry for the easy question.
I appreciate your answers.


--

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
macro syntax for selecting variable range Matt Excel Discussion (Misc queries) 1 October 31st 07 07:13 PM
Selecting Variable Rows Matt D. Excel Programming 3 June 18th 04 07:22 PM
Selecting a row with a variable ? Blewyn[_6_] Excel Programming 3 April 20th 04 08:16 AM
Selecting Variable Row Range w/Macro steve Excel Programming 3 February 26th 04 07:24 PM
Selecting a Range Using a Variable Bob J. Excel Programming 4 September 14th 03 09:24 PM


All times are GMT +1. The time now is 12:53 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"