LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
cdb cdb is offline
external usenet poster
 
Posts: 62
Default Problem with code about ranges

I have the following code that is not acting as I was hoping it would:

Dim SelectedRange As Range, RangeCheck As Range

Set SelectedRange = Sheet1.Range("C2:C10")
SelectedRange.Select
For Each RangeCheck In SelectedRange
Range(RangeCheck).Select

When I use the SelectedRange.Select command it selects the correct command,
but when it gets to the Range(RangeCheck).Select is selects cell AR644
instead of the first cell in the given range.

What am I doing wrong??

Any help would be greatly appreciated.

cdb
 
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
Problem with Multiple Ranges in code Paul S Excel Discussion (Misc queries) 1 April 12th 07 07:01 PM
VLOOKUP for Zip Code Ranges JerseyJR Excel Worksheet Functions 2 September 6th 05 06:37 PM
Macro - code for ranges urgent!!! rjc_29 Excel Programming 3 February 20th 04 11:44 AM
Defining ranges in VB code Rachael Moody Excel Programming 5 January 27th 04 02:21 PM
XL 2000: automating drag-and-drop for worksheet ranges. Using Code! Dan P Excel Programming 3 September 3rd 03 03:36 AM


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