Thread: KEEP ONE ZERO.
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default KEEP ONE ZERO.

One way:

A1 = N000023004

="N0"&--MID(A1,2,255)

Returns: N023004


On the off-chance that the first letter could possibly be something other
than an "N" and that the second character could possibly be something other
than "0", then this modification to your formula could be used...

=LEFT(A1,1+(MID(A1,2,1)="0"))&--MID(A1,2,255)

Rick