View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Find first occurence of specific data in a column.

Since your data is sorted then:
=vlookup(1.2005,A1:B2000,2,False)

in VBA

res = application.Vlookup(1.2005,Range("A1:B2000"),2,Fal se)

--
Regards,
Tom Ogilvy


"Ben" wrote in message
...
I would like to be able to run a macro that will find the first occurence

in
a column of specified data. There are multiple rows with 1.2005 then more
multiple rows with 2.2005 and so on. I need to locate the first instance

of
1.2005, 2.2005 etc and return the value in a cell in the same row but an
adjacent column.
Many thanks.



 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.