Custom Fomat

C

CraigH

I would like to change for way a list of part numbers is
formatted to a "7-4" format. See example below

Current Desired
1234567-4 1234567-0004 adds leading zeros to dash#
1234567-24 1234567-0024 adds leading zeros to dash#
M485743895A M485743895A does not change
 
P

Poh

Hi

Hope this will be able to help; where A1 is where the
part number is stored.
=IF(ISNUMBER(FIND("-",A1))=FALSE,A1,MID(A1,1,SEARCH("-
",A1)-1)) &"-" & TEXT(VALUE(RIGHT(A1,LEN(A1)-SEARCH("-
",A1))),"0000")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top