Is there an easy way to run the macro either for the selected table row only, or only for the rows where the lookup value is not blank?
What I am trying to do is that if I select PPM ID (from a drop-down list) the code runs and populates Level 0 (leveraging xLookup), but if I leave PPM ID blank, the code doesn't run for that row and doesn't overwrite Level ) column.
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("Tbl_Input_DB[PPM ID]")) Is Nothing Then
Call Copy_v1
End If
End Sub
Sub Copy_v1()
With Range("Tbl_Input_DB[Level 0]")
.Formula = "=XLOOKUP([@[PPM ID]],Q_BOW_LCM[PPM ID],Q_BOW_LCM[Pillar],"""")"
.Value = .Value
End With
Many thanks in advance!
@Fluff thank you for your earlier suggestion, any help would be appreciated.
What I am trying to do is that if I select PPM ID (from a drop-down list) the code runs and populates Level 0 (leveraging xLookup), but if I leave PPM ID blank, the code doesn't run for that row and doesn't overwrite Level ) column.
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("Tbl_Input_DB[PPM ID]")) Is Nothing Then
Call Copy_v1
End If
End Sub
Sub Copy_v1()
With Range("Tbl_Input_DB[Level 0]")
.Formula = "=XLOOKUP([@[PPM ID]],Q_BOW_LCM[PPM ID],Q_BOW_LCM[Pillar],"""")"
.Value = .Value
End With
Many thanks in advance!
@Fluff thank you for your earlier suggestion, any help would be appreciated.