LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Use column number in a range instead of column letter

You could work with offsets from the original range instead of specifying
column numbers...

For X = 0 To 11
Range("B3:B7").Offset(0, X).Select
' Do something with the selection
Next

--
Rick (MVP - Excel)


"Greg Snidow" wrote in message
...
Greetings. How can I use a column number in a range, instead of column
letters? For example, I have Range("B3:B7").Select. I want to copy and
paste this range in another place in the worksheet, then run some other
code,
and then copy Range("C3:C7") and run some code, all the way up to
Range("M3:M7"). I would like to be able to use a variable for the column
index, then just increment it by 1 at the end of the loop. Any ideas?
Thank
you.


 
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 turn excel columns from column number to column letter? column Setting up and Configuration of Excel 1 April 29th 08 10:15 AM
Column Number from Column Letter Robert[_32_] Excel Programming 5 June 8th 07 01:42 PM
Identify the column of a range by letter instead of number Peter Rooney Excel Programming 9 January 10th 06 10:29 AM
Get Column Letter from Column Number Gary Brown Excel Worksheet Functions 7 June 11th 05 02:08 AM
column header changed from letter to number, how return to letter Ron Excel Discussion (Misc queries) 2 May 9th 05 08:34 PM


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