Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find a Pattern and Parse Text
How can I use VBA to find a pattern such as ‘Checked Out To:’ and
everything between the quotes? The Excel file will have 16 characters, 20 with the .xls extension. Then there is a Return. Then ‘Checked Out To:’ with last name comma first name and there MAY be some brackets after that. Everything will ALWAYS be between quotes. “9900010X10G00904.xls Checked Out To: Jupree, Jasper [C-TO]” “9900010X10G11208.xls Checked Out To: Malfree, Jim” I’m experimenting with a concept such as this: If InStr(1, my_var, "Checked Out To: " & activeWB = "Checked Out To: " & activeWB, vbTextCompare) 0 Then ‘Something . . . MsgBox () End If There is a pattern, as described above, but I’m not sure how to parse everything between the quotes. Just so you know, all data comes from a URL; the my_var variable comes from this URL . . . all of this works fine! (Thanks Ron . . . ) Any ideas on how to handle this? Thanks!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where to find pattern fill add-in | Charts and Charting in Excel | |||
Where to find pattern fill add-in | Excel Discussion (Misc queries) | |||
How to find & delete a particular pattern of text from values of a | Excel Discussion (Misc queries) | |||
VBE Find and replace with pattern | Excel Programming | |||
Wish to parse through a text string to find data | Excel Programming |