Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, I'm a novice in Excel VBA and have been stuck finding a solution to the problem below: I need to do a partial matching for a string, "/F". Basically there is a floor (e.g. 13/F, 29/F) in every row, but not always in the same column. The one thing the floor cells have in common is the string above. I want to search for this string on every row and return the full cell. Is there any way I could do this in VBA or maybe simply using formulae. I'd very grateful on any light shed on this. Best wishes Will -- wilmanleung ------------------------------------------------------------------------ wilmanleung's Profile: http://www.excelforum.com/member.php...o&userid=31800 View this thread: http://www.excelforum.com/showthread...hreadid=515240 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Will,
Somethig along these lines: Sub a() With Worksheets(1).Range("a1:Z500") Set c = .Find("/F", LookIn:=xlValues) If Not c Is Nothing Then firstAddress = c.Address Do MsgBox c.Value & " found at " & c.Address Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address < firstAddress End If End With End Sub "wilmanleung" wrote: Hi all, I'm a novice in Excel VBA and have been stuck finding a solution to the problem below: I need to do a partial matching for a string, "/F". Basically there is a floor (e.g. 13/F, 29/F) in every row, but not always in the same column. The one thing the floor cells have in common is the string above. I want to search for this string on every row and return the full cell. Is there any way I could do this in VBA or maybe simply using formulae. I'd very grateful on any light shed on this. Best wishes Will -- wilmanleung ------------------------------------------------------------------------ wilmanleung's Profile: http://www.excelforum.com/member.php...o&userid=31800 View this thread: http://www.excelforum.com/showthread...hreadid=515240 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find partial match from column A,B and fill partial match in C? | Excel Discussion (Misc queries) | |||
PARTIAL TEXT MATCH SEARCHING FOR THE FIRST 6 CHARACTERS? | Excel Worksheet Functions | |||
Searching for partial text match in range | Excel Worksheet Functions | |||
Searching for partial data in a column | Excel Discussion (Misc queries) | |||
searching a string with a partial string | Excel Programming |