![]() |
Search for multiple things at once
I'm trying to do a search to determine if any cells contain references to
other worksheets in the same workbook. For instance, if I've got a worksheet named "Daily" and another worksheet named "YTD", I may have a function like this: =MAX(Daily!A2:A999) I want to identify that cell as referring to another worksheet. I have a search feature that currently looks for linked worksheets according to one of three strings (strSearch is a String variable containing the name of the worksheet I'm searching for): strSearch & "'" strSearch & "!" strSearch & "," I can't use wildcards (strSearch & "*") because I have other cells that link to entirely different WORKBOOKS, that may have the word "Daily" as part of the path (does that make sense)? Right now I'm executing three different searches, as shown above. Set objFind = objWorksheet.Find(strSearch & "'", LookIn:=xlFormulas). etc. Is there a way I can combine these three parameters into one search? Something like strSearch & "'" OR strSearch & "!" OR strSearch & "," I hope this makes sense. TIA. -- Hmm...they have the Internet on COMPUTERS now! |
All times are GMT +1. The time now is 12:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com