Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Using Columns().Row() To create a range

Columns(13 + CurNumOfVer & ":" & 13 + CurNumOfVer +
newversions).Rows(startrowTO & ":" & startrowTO + endrow -
startrowFROM)
This is what I am using in a macro. I want to use it like
this
For Each Cell In (above statement)

The variables are correct, they are not important. What I
am looking to do is create a range object so the for loop
can work. The start and stop row and columns are always
variable in the macro however. I believe if I were to
have a constant I could go Columns("1:2").Rows("3:4"), for
instance, and the for loop would function properly. Is
there a way for me to easily declare a range with the
variable stop/start columns and start/stop rows? Any help
is, as always, very much appreciated. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Using Columns().Row() To create a range

Hi
try
range(cells(start_row,start_col),cells(end_row,end _col)).select

--
Regards
Frank Kabel
Frankfurt, Germany


Wandering Mage wrote:
Columns(13 + CurNumOfVer & ":" & 13 + CurNumOfVer +
newversions).Rows(startrowTO & ":" & startrowTO + endrow -
startrowFROM)
This is what I am using in a macro. I want to use it like
this
For Each Cell In (above statement)

The variables are correct, they are not important. What I
am looking to do is create a range object so the for loop
can work. The start and stop row and columns are always
variable in the macro however. I believe if I were to
have a constant I could go Columns("1:2").Rows("3:4"), for
instance, and the for loop would function properly. Is
there a way for me to easily declare a range with the
variable stop/start columns and start/stop rows? Any help
is, as always, very much appreciated. Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Using Columns().Row() To create a range

THANK YOU! That is what I am looking for!

-----Original Message-----
Hi
try
range(cells(start_row,start_col),cells

(end_row,end_col)).select

--
Regards
Frank Kabel
Frankfurt, Germany


Wandering Mage wrote:
Columns(13 + CurNumOfVer & ":" & 13 + CurNumOfVer +
newversions).Rows(startrowTO & ":" & startrowTO +

endrow -
startrowFROM)
This is what I am using in a macro. I want to use it

like
this
For Each Cell In (above statement)

The variables are correct, they are not important.

What I
am looking to do is create a range object so the for

loop
can work. The start and stop row and columns are always
variable in the macro however. I believe if I were to
have a constant I could go Columns("1:2").Rows("3:4"),

for
instance, and the for loop would function properly. Is
there a way for me to easily declare a range with the
variable stop/start columns and start/stop rows? Any

help
is, as always, very much appreciated. Thanks!

.

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
How do I create a Range Name? Curious New Users to Excel 7 December 14th 07 09:13 PM
How do I create automatic columns Jezebella Excel Discussion (Misc queries) 1 June 10th 06 12:06 AM
Create four columns out of one Hasse Excel Discussion (Misc queries) 5 February 16th 06 02:01 PM
Create stacked columns chart but with 2 columns for each x axis? PSM Charts and Charting in Excel 2 May 7th 05 03:56 PM
NEED TO CREATE 4 COLUMNS UNDER SIX T[_2_] Excel Programming 1 May 19th 04 09:02 PM


All times are GMT +1. The time now is 10:54 PM.

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"