ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Urgent - VBA procedure (https://www.excelbanter.com/excel-discussion-misc-queries/66107-urgent-vba-procedure.html)

Jeff

Urgent - VBA procedure
 
=OFFSET(INDIRECT(ADDRESS(MATCH(908,$A:$A,0),1,2,), TRUE),1,16)

I need help to design a VBA procedure, based on the formula above, that
would allow me to input with an Inputbox the several customer numbers (in
this case 908) to be added in row T8

--
Regards,
Jeff


Bob Phillips

Urgent - VBA procedure
 
Jeff,

Try this

Dim iMatch As Long
On Error Resume Next
iMatch = Application.Match(908, Range("A:A"), 0)
On Error GoTo 0
If iMatch 0 Then
MsgBox ActiveCell.Offset(iMatch - ActiveCell.Row + 1, 16 -
ActiveCell.Column + 1)
End If

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jeff" wrote in message
...
=OFFSET(INDIRECT(ADDRESS(MATCH(908,$A:$A,0),1,2,), TRUE),1,16)

I need help to design a VBA procedure, based on the formula above, that
would allow me to input with an Inputbox the several customer numbers (in
this case 908) to be added in row T8

--
Regards,
Jeff





All times are GMT +1. The time now is 08:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com