View Single Post
  #5   Report Post  
Myrna Larson
 
Posts: n/a
Default

Hi, Frank:

You are staying up too late <bg!

Your first formula was missing a left paren before the first &. After that
fix, it gave me two dashes in the results, which was fixed by inserting +1
before the ",10" in the MID formula. So it ended up as this, which worked
correctly.

=LEFT(A1,FIND("-",A1)) & TEXT(--(MID(A1,FIND("-",A1)+1,10)),"00")

For the 2nd, shorter formula, no cigar on that one <bg. It inserts the
additional zero at the front instead of after the dash.

32-1 comes out as 03-21 instead of 32-01

Myrna Larson


On Tue, 16 Nov 2004 22:42:19 +0100, "Frank Kabel"
wrote:

Hi
or another alternative (a little bit shorter):
=TEXT(--SUBSTITUTE(A1,"-",""),"00-00")