Hi.
Think I've made an accidental infinite loop in my code.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
If Intersect(Target, Range("W6:W1000")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
If Target.Count = 1 Then
If Target.Value = "" Then
Target.Formula = "= R[0]C[-21]"
End If
If Target.Value = "(blank)" Then
Target.Formula = ""
End If
Else
For Each Cell In Target
If Cell.Value = "" Then
Cell.Formula = "= R[0]C[-21]"
End If
Next Cell
End If
Application.ScreenUpdating = True
End Sub
So to put that into English, I want the code to first look for any blank values and change them into the value of the cell that is 21 to the left. This is done.
THEN I want it to look at all the values AFTER this first If statement has been made and run a second If statement.
The second one will look for "(blank)" and turn it into "" a blank value.
But at this point the first formula has done it's job and I don't want it to repeat again.
...Understand this is awfully complicated and I'm possibly coming at it the wrong way, so straight up alternatives rather than small fixes would be useful.
Cheers.
Bookmarks