Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Increasing alphabectically

Windows XP and Excel 2003

The first time through the program should read:

With Active Sheet
.First = Sheets("Rates").Range("B2")
.Second = Sheets("Rates").Range("B3:B186")
End With

The next time through the Ranges should read "C2" and "C3:C186"

Then next time "D2" and "D3:D186" and so on until it reaches "X2"and
"X3:X186"

Can someone suggest a good way to do this. Please.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Increasing alphabectically

I'll give you what you need to answer your question, however some of your
syntax doesn't make sense. If you have other questions, come back.

Option Explicit

Sub test()

Dim myRange As Excel.Range
Dim r As Excel.Range

Dim myWS As Excel.Worksheet

Set myWS = Worksheets("Rates")
Set myRange = myWS.Range("B2:X2")

For Each r In myRange
Debug.Print r.Address
Debug.Print r.Offset(1, 0).Resize(184, 1).Address
'fill in what you want to do here.
Next r

End Sub
--
HTH,

Barb Reinhardt



"HarryGuy" wrote:

Windows XP and Excel 2003

The first time through the program should read:

With Active Sheet
.First = Sheets("Rates").Range("B2")
.Second = Sheets("Rates").Range("B3:B186")
End With

The next time through the Ranges should read "C2" and "C3:C186"

Then next time "D2" and "D3:D186" and so on until it reaches "X2"and
"X3:X186"

Can someone suggest a good way to do this. Please.




.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Increasing alphabectically

Thanks very much to all who responded - very much appreciated.

"Barb Reinhardt" wrote in message
...
I'll give you what you need to answer your question, however some of your
syntax doesn't make sense. If you have other questions, come back.

Option Explicit

Sub test()

Dim myRange As Excel.Range
Dim r As Excel.Range

Dim myWS As Excel.Worksheet

Set myWS = Worksheets("Rates")
Set myRange = myWS.Range("B2:X2")

For Each r In myRange
Debug.Print r.Address
Debug.Print r.Offset(1, 0).Resize(184, 1).Address
'fill in what you want to do here.
Next r

End Sub
--
HTH,

Barb Reinhardt



"HarryGuy" wrote:

Windows XP and Excel 2003

The first time through the program should read:

With Active Sheet
.First = Sheets("Rates").Range("B2")
.Second = Sheets("Rates").Range("B3:B186")
End With

The next time through the Ranges should read "C2" and "C3:C186"

Then next time "D2" and "D3:D186" and so on until it reaches
"X2"and
"X3:X186"

Can someone suggest a good way to do this. Please.




.



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
Increasing alphabectically Mike H Excel Programming 0 November 27th 09 04:28 PM
Increasing alphabectically Bernard Liengme Excel Programming 0 November 27th 09 03:45 PM
Increasing numbers. pawnraider Excel Discussion (Misc queries) 3 May 21st 09 12:45 PM
Increasing Row Value [email protected] Excel Programming 1 November 20th 07 11:16 PM
Increasing M in M/D/Y Bill45 Excel Discussion (Misc queries) 2 May 19th 05 06:32 PM


All times are GMT +1. The time now is 12:09 PM.

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"