Delete if Cells are blank
Hi all I have been Useing this code and it works quite well
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range, cell As Range
Application.EnableEvents = False
If Not Intersect(Target, Columns(5)) Is Nothing Then
Set rng = Intersect(Target, Columns(5))
Application.EnableEvents = False
For Each cell In rng
cell.Offset(0, -1).Value = "=VLOOKUP(RC[1],Language,3,FALSE)"
cell.Offset(0, -2).Value = "=VLOOKUP(RC[2],Language,2,FALSE)"
Next
rng(rng.Cells.Count)(2, 1).Select
End If
Application.EnableEvents = True
End Sub
But I was wondering if there was a way to add that if Target, Columns(5)) is empty to remove and formulas in Offset(0, -1) and Offset(0, -2) any help is really appreciated