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 cells

I've got a question that is really simple, but I just can't figure out
how to get the syntax right.
I want the macro to pick a certain column, which is identified from
user input, and then select a range below that to run a loop through.
This is the current code:

Range("o7:r7").Find(What:=MyValue3).Activate
Range("d9:d360").Select

(MyValue3 is defined by the user and is a week number found in the
range O7 to R7).
What I want to replace is the Range d9:d360 with a reference that will
select from rows 9 to 360 no matter what column it's in.
I tried Range("[RC]:[RC360]") to no avail.
What am I doing wrong, and what will make this work?
Thanks,
a very frustrated beginner....


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Selecting cells

Is this what you're trying to do?

Dim intC As Integer

Range("o7:r7").Find(What:=MyValue3).Activate
intC = ActiveCell.Column
Range(Cells(9, intC), Cells(360, intC)).Select


HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

I've got a question that is really simple, but I just can't figure out
how to get the syntax right.
I want the macro to pick a certain column, which is identified from
user input, and then select a range below that to run a loop through.
This is the current code:

Range("o7:r7").Find(What:=MyValue3).Activate
Range("d9:d360").Select

(MyValue3 is defined by the user and is a week number found in the
range O7 to R7).
What I want to replace is the Range d9:d360 with a reference that will
select from rows 9 to 360 no matter what column it's in.
I tried Range("[RC]:[RC360]") to no avail.
What am I doing wrong, and what will make this work?
Thanks,
a very frustrated beginner....


---
Message posted from http://www.ExcelForum.com/


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
Selecting more cells than I want ClaireView Excel Discussion (Misc queries) 6 January 19th 10 05:44 PM
Selecting multiple cells, I can't see the cells highlighted ET Excel Discussion (Misc queries) 1 August 1st 08 03:20 PM
How to change shade of cells when selecting multiple cells abrummet Excel Discussion (Misc queries) 3 September 6th 07 11:42 AM
By selecting cells adjacent to cells tally sheet tom Excel Worksheet Functions 2 September 20th 06 07:09 PM
selecting cells Chris Excel Discussion (Misc queries) 3 July 17th 06 09:58 PM


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