Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default how do I eliminate leading "0s" in an alpha numeric cell

I have ID numbers that are alpha numeric. Some are all numeric formatted as
text, others are actual alpha numeric combinations. Most all have leading
"0s". I was hoping I would be able to use a function in a formula to easily
eliminate them.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default how do I eliminate leading "0s" in an alpha numeric cell

On Wed, 13 Sep 2006 15:39:02 -0700, REST
wrote:

I have ID numbers that are alpha numeric. Some are all numeric formatted as
text, others are actual alpha numeric combinations. Most all have leading
"0s". I was hoping I would be able to use a function in a formula to easily
eliminate them.


Give some examples of the values.

If the values only include numbers, you can remove the leading zeros with a
formula:

=--A1

That will convert the value to a number and the appearance will depend on the
formatting of the cell. If the format is General, no leading zeros will
appear.

If the value might contain both numbers and letters, and you want to strip off
the leading zeros, then one way would be to use this **array** formula:

=MID(A1,MATCH(FALSE,"0"=MID(A1,ROW(INDIRECT("1:"&L EN(A1))),1),0),255)

To enter an array formula, hold down <ctrl<shift while hitting <enter.
Excel will place braces {...} around the formula.

OR

you could download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/ and use the Regular Expression formula:

=REGEX.MID(A1,"[^0].*")


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Combining data (numeric format) in multiple cells into one cell (t GNAC SID Excel Discussion (Misc queries) 2 February 7th 05 04:09 PM
resolving a numeric cell entry for its meaning vtcrob Excel Worksheet Functions 0 February 4th 05 02:23 AM
Count unique alpha numeric "characters" in a common cell WIM4246 Excel Worksheet Functions 4 December 11th 04 02:27 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"