Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Partial Searching on a row


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Partial Searching on a row

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find partial match from column A,B and fill partial match in C? Tacrier Excel Discussion (Misc queries) 4 October 24th 08 11:24 PM
PARTIAL TEXT MATCH SEARCHING FOR THE FIRST 6 CHARACTERS? KLZA Excel Worksheet Functions 1 October 23rd 07 05:46 PM
Searching for partial text match in range [email protected] Excel Worksheet Functions 3 September 12th 06 05:58 AM
Searching for partial data in a column Severin Excel Discussion (Misc queries) 2 October 3rd 05 06:33 PM
searching a string with a partial string dcstech Excel Programming 1 April 5th 04 10:57 PM


All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"