Increasing alphabectically

H

HarryGuy

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.
 
B

Barb Reinhardt

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top