select columns by variable
Hi Jack,
Try:
'<<=============
Sub Tester02()
Dim i As Long
i = Sheets("Sheet1").Range("A1").Value '<<==== CHANGE
With Sheets("Sheet2")
.Activate
.Range("B2").Resize(5, i).Select
End With
End Sub
'<<=============
Note, however, that it is rarely necessary or desirable to make selections
---
Regards,
Norman
"Jack" wrote in message
...
Is there something in vba that will allow me to select a certain amount of
columns by variable?
I have a sum that is formulated on sheet1. I need to figure out how to
select that many columns starting at b1 on sheet 2. If it matters I need
to
have 5 rows by ever how many columns.
thanks so much for your help!
|