BulldogMike

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

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

SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.

ASKER CERTIFIED SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

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

orOpen 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.