Dim ans as String, num as Long
Dim res as Variant
ans = Inputbox("Enter 6 digit number")
if isnumeric(ans) and len(trim(ans)) = 6 then
num = clng(ans)
res = application.Match(num, range("A1:E1"),0)
if not iserror(res) then
col = range("A1")(1, res).Column
else
msgbox "Not found"
end if
End if
--
Regards,
Tom Ogilvy
"Prema" <Prema@discussions.microsoft.com> wrote in message
news:2A58FB82-42D8-46A4-A88B-3E151A1B4928@microsoft.com...
> I have the following data in columns A to E:
> 414816 414251 420374 420101 420121
>
> user will be requested to enter the desired 6 digit number and I would
like
> to establish the related column to use for updating certain cells in that
> column.
>
> Can anyone give me codes to achieve this?
>
> Thank you
> Prema
Bookmarks