Avatar of BulldogMike
BulldogMike
Flag for United States of America asked on

FIND AND REPLACE WILDCARD - CELL FORMAT

Hi

I want to do a Find and Replace using Excel's built in Find and Replace function instead of VBA coding in Excel 2007

I want to find (numeric data pairs) like 00 00 00 00 00  (i.e.  43 99 10 02 31)  but not like as 00 00 00 00 00 00 00 (i.e.  43 99 10 02 31 01 20).  And, of course vice versa.  So find 5 pairs not 6 or seven.  6 pairs but not 7 or 5 pairs. etc.  All cells that will be searched are numerically formatted  

It seems simple but I just don't get the Excel syntax to do this with the wild cards.  

Thanks

Mike
I Hate Syntax
Microsoft ExcelSpreadsheetsVBA

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
SOLUTION
zorvek (Kevin Jones)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
gowflow

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
aikimark

You're going to need the power of regular expressions.
http:A_1336-Using-Regular-Expressions-in-Visual-Basic-for-Applications-and-Visual-Basic-6.html

For this simple find operation, you can create a VBA function that uses the Like operator and this pattern:
## ## ## ## ##

Open in new window

or
## ## ## ## ## ##

Open in new window

For best flexibility, you would pass the pattern or the repeat value (5 or 6) and the VBA function would return True or False.
Martin Liss

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes