search for a number format

ermccarthy

Board Regular
Joined
Feb 15, 2002
Messages
224
I need to search for a specfic number format, and ignore everything else.

I am looking for a Text format the is 3 numbers, a dash, followed by 8 numbers. (###-########). I know how to write a macro to search for a specific string, but not for a format.

Any Suggestions??
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
:( :( :(

nevermind, back to drawing board.




the following formula should work (either in a cell for sorting or conditional formatting)
=AND(ISNUMBER(SUBSTITUTE(A1,"-","",1)+0),LEN(SUBSTITUTE(A1,"-","",1)=11),LEN(A1)<>11)

good luck
This message was edited by IML on 2002-04-05 08:36
 
Upvote 0
Maybe
=AND(LEFT(A1,3)&"-"&RIGHT(A1,8)=A1,LEN(A1)=12,ISNUMBER(SUBSTITUTE(A1,"-","",1)+0))
 
Upvote 0
On 2002-04-05 08:24, ermccarthy wrote:
I need to search for a specfic number format, and ignore everything else.

I am looking for a Text format the is 3 numbers, a dash, followed by 8 numbers. (###-########). I know how to write a macro to search for a specific string, but not for a format.

Any Suggestions??

If you're just trying to locate where this format has been used on a worksheet, and this is a "one-time" need...

1. Make a copy of your worksheet and select all of its cells.
2. Using ASAP Utilities freeware add-in (see www.asap-utilities.com) choose its Range | Convert cell's value to its formatted look menu command.
3. Now, you can use Excel's Find command and search for ???-????????.
This message was edited by Mark W. on 2002-04-05 08:57
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,382
Members
448,889
Latest member
TS_711

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top