View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default selecting a variable row range

I have the following code working to select my fixed
source and destination ranges. How do I change my fixed
sourceRange to a variable sourceRange. Currently the
sourceRange is fixed .Range(K3:M3), this is date data, but
I could have 1 date in K3 only or dates from K3 to IV3.
How do I select this variable range?

Dim sourceRange As Range, destRange As Range
Dim Lr As Long

Lr= LastRow(Sheets("S1"))+1
Set sourceRange = Sheets("S1").Range("K3:M3")

I already setup my LastRow and LastColumn FUNCTIONs to
support Lr. Thanks goes to Ron de Bruin and his website
for coding help. Thanks for the help.