VBA Procedure

J

Jeff

Hello,
This is my VBA procedure:
I'd like to add in row T11 all values for the different customer number that
the users enter in the Inputbox.

Dim ans
Dim fValid As Boolean

fValid = False
Do
ans = InputBox("Input Customer Number")
If ans = "" Then
Exit Sub
Else
If IsNumeric(ans) Then
If ans > 0 Then
fValid = True
iMatch = Application.Match(ans, Range("A:A"), 0)
'more code
End If
End If
End If
Loop Until fValid
Range("T11").Value = ActiveCell.Offset(iMatch - ActiveCell.Row + 1, 16 -
ActiveCell.Column + 1)
 
Top