changing the 9 to a variable, Microsoft Excel, newsgroup, help, assistance" /> changing the 9 to a variable Excel Worksheet Functions" /> Range("C9:V9").Select ==> changing the 9 to a variable - ExcelBanter

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
B. F.
 
Posts: n/a
Default Range("C9:V9").Select ==> changing the 9 to a variable

I am defining the current selector row thru this statements:

Dim Currow As Integer
Currow = ActiveCell.Row

Now I need to change:

Range("C9:V9").Select

to a variable range definition where the 9 is substituted by the value
of the current row (Currow)
I tried several ways of doing it by always got a "wrong syntax" error
when executing.

Coud you please help me ?
TIA, Jorge

  #3   Report Post  
KL
 
Posts: n/a
Default

Try:

Range("C" & Currow & ":V" & Currow).Select

Regards,
KL

"B. F." wrote in message
oups.com...
I am defining the current selector row thru this statements:

Dim Currow As Integer
Currow = ActiveCell.Row

Now I need to change:

Range("C9:V9").Select

to a variable range definition where the 9 is substituted by the value
of the current row (Currow)
I tried several ways of doing it by always got a "wrong syntax" error
when executing.

Coud you please help me ?
TIA, Jorge



  #4   Report Post  
duane
 
Posts: n/a
Default


range(cells(currow,3),cells((currow,22)).select


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=372974

  #5   Report Post  
Ron Coderre
 
Posts: n/a
Default

Two things:
1)Not sure how you're doing it now, but this should work:

Range("C" & CurrRow & ":V" & CurrRow).Select

2)Excel has 65,536 rows, but Integer variables max out at 32,767. You might
want to define currrow as Long (which goes somewhere past 2 million.

--
Regards,
Ron



  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

A couple of ways:

Cells(Currrow, 3).Resize(1, 20).Select

or

Range("C" & Currow & ":V" & Currow).Select




In article .com,
"B. F." wrote:

I am defining the current selector row thru this statements:

Dim Currow As Integer
Currow = ActiveCell.Row

Now I need to change:

Range("C9:V9").Select

to a variable range definition where the 9 is substituted by the value
of the current row (Currow)
I tried several ways of doing it by always got a "wrong syntax" error
when executing.

Coud you please help me ?
TIA, Jorge

  #7   Report Post  
B. F.
 
Posts: n/a
Default

Thanks a lot for the precise and VERY fast replies.
My problem is solved in record time.
Replying to Don=B4s question: the next steps are copy & paste.
Best Regards, Jorge

  #8   Report Post  
B. F.
 
Posts: n/a
Default

Thanks a lot for the precise and VERY fast replies.
My problem is solved in record time.
Replying to Don=B4s question: the next steps are copy & paste.
Best Regards, Jorge

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
Countif Formula with changing criteria Stephen Excel Discussion (Misc queries) 2 May 2nd 05 07:24 AM
Changing the format of an Excel output file made by Microsoft Access Amir Excel Discussion (Misc queries) 2 May 1st 05 12:57 AM
How do I stop excel automatically changing my date to 2005? zoemcb Excel Discussion (Misc queries) 6 April 30th 05 02:39 AM
changing page break in an excel file ibs81 New Users to Excel 1 April 14th 05 07:03 PM
Changing the Direction of Data within a Column Michael Parsons Excel Worksheet Functions 1 January 27th 05 06:52 PM


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