Hi, im literally brand new to VBA's
i have a worksheet that is using a vlookup formula, and its basically allows me to over write a cell but then restore the formula if i delete the overwrite.
i need to apply the same macro to all the rows and continue the cell references
macro:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "O7" Then
If IsEmpty(.Value) Then
Application.EnableEvents = False
.Formula = "=T7"
Application.EnableEvents = True
End If
End If
End With
End Sub
i need this to continue down to O32 and for the "T" row numbers to follow i.e (o8 = t8 etc). pretty much as if i dragged the formula down.
Could be simple, but i have only found very broad info and cant make sense of it.
i have a worksheet that is using a vlookup formula, and its basically allows me to over write a cell but then restore the formula if i delete the overwrite.
i need to apply the same macro to all the rows and continue the cell references
macro:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "O7" Then
If IsEmpty(.Value) Then
Application.EnableEvents = False
.Formula = "=T7"
Application.EnableEvents = True
End If
End If
End With
End Sub
i need this to continue down to O32 and for the "T" row numbers to follow i.e (o8 = t8 etc). pretty much as if i dragged the formula down.
Could be simple, but i have only found very broad info and cant make sense of it.