Hello everyone.
When the below code with this workbook Save_Update Customer.xlsm is hit the customer in sheets "Customer" updates the existing customer in "Sheet1".
Can anyone add to my code that if the customer does not exist in "Sheet1" it would instead add the customer below the last customer?
Sub Button3_Click()
Dim CustomerName
Dim WkRow
Dim Test As Boolean
CustomerName = Range("A59")
WkRow = Evaluate("=MATCH(""" & CustomerName & """,Sheet1!$A:$A,0)")
Test = Application.WorksheetFunction.IsNumber(WkRow)
If (Test) Then
Rows(59 & ":" & 59).Copy
With Sheets("Sheet1")
.Rows(WkRow & ":" & WkRow).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With
End If
End Sub
Thanks in advance
Bookmarks