LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Find wildcard text within a cell

Hi,
Start on the Text you want to extract from, hope this helps.
Sub Macro1()
SearchText = ActiveCell.Value
FirstQuote = Application.WorksheetFunction.Find("""", SearchText, 1)
SecondQuote = Application.WorksheetFunction.Find("""", SearchText,
FirstQuote + 1)
ThirdQuote = Application.WorksheetFunction.Find("""", SearchText,
SecondQuote + 1)
FirstItem = Mid(SearchText, FirstQuote + 1, SecondQuote - FirstQuote - 1)
SecondItem = Mid(SearchText, ThirdQuote + 1, Len(SearchText) - 1)
SecondItem = Mid(SecondItem, 1, Len(SecondItem) - 1)
End Sub

Thanks,

"indiana1138" wrote:

Hi all,

I need to run a loop search where I find a cell in a particular column
that begins with the text, "**Item". I can do that. But when I find it,
there will be a text string of varying length inside that is bordered
by quotes, and I need to extract that string to a variable. The cell
contents will look something like this:

**Item "app04:/C/" for client "app04"

The two strings in quotes are what I need to extract. The structure of
these cells will always be the same, like:

**Item "something" for client "something"

Can anyone help? I've hit a a pothole in my brain. :)

Thanks,

Bob


 
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
Using wildcard characters in find & replace Tola Excel Worksheet Functions 4 May 5th 10 07:35 PM
Find and Replace Command Using Wildcard Help rgilbreath Excel Discussion (Misc queries) 1 October 10th 08 04:01 AM
Find Replace Wildcard dk New Users to Excel 9 September 23rd 08 03:45 AM
Using IF to find text + wildcard? Outlook, eh? Excel Worksheet Functions 8 July 3rd 07 04:46 PM
Excel custom autofilter- how to find wildcard characters but not as wildcards (e.g. "?") in a cell Keith Excel Discussion (Misc queries) 3 December 22nd 06 02:27 PM


All times are GMT +1. The time now is 03:14 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"