View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Phil H[_2_] Phil H[_2_] is offline
external usenet poster
 
Posts: 87
Default Run-Time Error on Cell Range Select

I get a run-time error 1004 on the .Select line. Can someone suggest a fix?

Sub FindDate()
Dim rn As Long, offset As Long
Dim stdate As Date, actdate As Date
actdate = Range("Z2").Value
rn = IsoWeekNumber(actdate)
If rn / 2 < Int(rn / 2) Then rn = rn €“ 1
stdate = Range("A" & rn + 6).Value
offset = actdate €“ stdate
Range(Cells(rn + 6, 3 + offset), Cells(rn + 7, 3 + offset)).Select
End Sub