Here are the revised codes for the selection of the customer and the clear button
Sub test3()
Dim cus As String
Dim rng As Range
cus = InputBox("Which Customer?")
Set rng = Sheets("Form").Range("A1")
Dim x As Variant
x = WorksheetFunction.Match(cus, Sheets("Data").Range("C:C"), 0)
rng.Value = Sheets("Data").Range("A" & x)
End Sub
Sub clear()
Range("A1:D3").ClearContents
End Sub
For the printing, what is the print range?
Alternative to an input box for the customer name, you may want to use a combo box to select the name.
Bookmarks