XL2002 - I'm having a bad day!

T

Trevor Williams

My mind is blank today...

I have a cell containing a letter. I want to use the letter to reference a
column.
I then want to reference a column 2 columns to the right of the first column.
Sounds easy, but as I said, I'm having a bad day.

Here's what I have...

Dim cell As Range

For Each cell In Sheets("Lists").Range("A1:A5")
my1stCol = cell.Value
my2ndCol = my1stCol + 2
msgbox (my1stCol & " ... " & my2ndCol)
Next

Thanks in advance.

Trevor Williams
 
D

Don Guillett

Use OFFSET

Sub useoffset()
For Each c In Range("a1:a5")
MsgBox c & "..." & c.Offset(, 1)
Next c
End Sub
 
Top