hello
I try finding way to subtract the quantity from sheet sales after fill quantity in column f should search the brand and update the quantity in column e in sheet inventory but I failed
this is my trying
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 6 Or Target.Row = 19 Then Exit Sub
Dim rngFound As Range
With Worksheets("inventory").Columns(1)
Set rngFound = .Find(Target(19, 2).Value)
If Not rngFound Is Nothing Then
Application.Goto rngFound
rngFound(1, 5).Value = rngFound(1, 5).Value - Target.Value
Else
MsgBox "No match found for " & Target.Value
End If
End With
End Sub
so i need help to fix my problem