jamescooper
Well-known Member
- Joined
- Sep 8, 2014
- Messages
- 840
Hello, can anyone spot the obvious error in this code that is the reason for it not running please?
I am receiving runtime error 438. In cell AD2 the row is dynamic, but it is currently 2.
Thanks.
Code:
Private Sub Worksheet_Calculate()
Sheets("Data").Range("C" & Sheets("Data").Range("AD2")).AutoFill Destination:=Range("C" & Sheets("Data").Range("AD2") & ":C" & Sheets("Data").Sheets("Data").Range("D" & Rows.Count).End(xlUp).Row)
End Sub
Thanks.