Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find first occurence of specific data in a column.
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find first occurence of specific data in a column.
"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. just whack: =if(a2=a1,"It changes here!","") in cell b2 then copy it down |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find first occurence of specific data in a column.
Problem solved!
Many thanks. "Tom Ogilvy" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find a First Occurence in a Column | Excel Discussion (Misc queries) | |||
find 2nd occurence | Excel Discussion (Misc queries) | |||
Find first occurence in a list that's greater than a specific num | Excel Worksheet Functions | |||
How can I find and sort specific data within a column? | Excel Discussion (Misc queries) | |||
Find column letter containing specific data | Excel Worksheet Functions |