Excel Error Query: 'Subscript 13 error: Type Mismatch' with regard to this particular code

Viewed 24

I have this particular code to run automatically upon changes to my table in a worksheet. So far it works when needed (adding a new entry or row etc):

If Target.Column = 1 And Target.Offset(0, 21).Value = "" Then
    Target.Offset(0, 21) = Format(Now(), "DD/MM/YYYY HH:MM:SS")
End If

However, when I make direct alterations to my table data (in other columns) and when I use the 'fill handle' function to make changes to multiple cells at once, it returns me a Subscript 13 error with the code (above) highlighted.

Is there a code for excel to skip/pass or do nothing, if the conditions are not met for the If statement?

0 Answers
Related