Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Value searching UP
Hey
I need to find the last value in a range. Lets say I have values in A1:A10. In A2:A5 the value is "test". In all other cells in this range the values are different. My lookup value is "test" I would like for a vba code to return A5 as A5 is the last cell in the range to contain my lookup value. Thanks todd |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Value searching UP
Sub Foo()
Set Rng = Range("A1:A10") rcount = Rng.Rows.Count For i = rcount To 1 Step -1 If Cells(i, 1) = "test" Then MsgBox "Found test at " & Cells(i, 1).Address Exit Sub End If Next i End Sub "Todd Huttenstine" wrote: Hey I need to find the last value in a range. Lets say I have values in A1:A10. In A2:A5 the value is "test". In all other cells in this range the values are different. My lookup value is "test" I would like for a vba code to return A5 as A5 is the last cell in the range to contain my lookup value. Thanks todd |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Value searching UP
See your other thread
-- Regards Ron de Bruin http://www.rondebruin.nl "Todd Huttenstine" wrote in message oups.com... Hey I need to find the last value in a range. Lets say I have values in A1:A10. In A2:A5 the value is "test". In all other cells in this range the values are different. My lookup value is "test" I would like for a vba code to return A5 as A5 is the last cell in the range to contain my lookup value. Thanks todd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Searching or Find question | Excel Discussion (Misc queries) | |||
Microsoft Excel cannot find data you are searching for | Excel Worksheet Functions | |||
Searching, matching then searching another list based on the match | Excel Discussion (Misc queries) | |||
changing the default type of searching in the find function | Excel Discussion (Misc queries) | |||
Find (Ctrl +F) not searching all open sheets | Excel Worksheet Functions |