View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Range Efficeincy

Hi Steven,

Try:

'=============
Public Sub Tester004()
Dim rng As Range
Dim LRow As Long
Const col As String = "A" '<<==== CHANGE

LRow = Cells(Rows.Count, col).End(xlUp).Row

Set rng = Range(col & "2:" & col & LRow)

End Sub
'<<=============

---
Regards,
Norman



"Steven" wrote in message
ups.com...
Is there anyway of not hard coding the column to A?

Currently I have different variables stored from Cols A to G?

Apologies I'm new to this.