# remove any occurance of zero from the left

I need excel formula to get rid of  zeros from left

for example

column A has
0007
0008
0008
0002
0003
0005
0005
0004
0026
0015
0016
0007
0008
0019
0015
0006

output should be

7
8
8
2
3
5
5
4
26
15
16
7
8
19
15
6
LVL 5
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ConsultantCommented:
=MID(A1,MIN(FIND(ROW(\$2:\$10)-1,A1&"123456789")),99)

Enter as an array formula by pressing CTRL+SHIFT+ENTER.

Kevin
Author Commented:
Kevin:

My data is in B column and all other column have data as well
Commented:
It seems your data column is formatted as text.

Is that right?

If it is, you could simply format the data column as number by highlighting the entire column -> right mouse click -> format cells -> choose number formatting.

Otherwise, a simple formula such as =Int(yourvalue in column b here) will suffice then you can just copy the entire data set and paste it back in as number values.

Hope this helps.
Lai
Chief Operations ManagerCommented:
One of these two methods should work.

Format cells as number formatting
Select the range you want to type number without showing leading zeros.
Right click to click Format Cells to open Format Cells dialog
Select Number from the Category pane, then click OK.

Select the range cells which are filled by numbers with leading zeros.
Click the yellow warning icon besides the selection, and select Convert to Number from the context menu.
ConsultantCommented:
Insert a column after column B. Put this formula in cell C1:

=MID(A1,MIN(FIND(ROW(\$2:\$10)-1,A1&"123456789")),99)

Enter by pressing CTRL+SHIFT+ENTER. Copy the formula down as far as needed. Select column C, copy, paste values, and delete column B.

Kevin
Finance AnalystCommented:
Kevin - why do you need such a complicated formula:

=VALUE(A1) will convert to value

Copy down as required.

Alternative, if error flagging is switched on there will no doubt be a green triangle to indicate that the cell has number displayed as text. Select the range and in the first one use the error handler pop up menu to the left of the cell and select convert to number.

Thanks
Rob H
ConsultantCommented:
Good point. But he wants it to remain text I believe. So...

=TEXT(VALUE(A1),"#")

Kevin

Experts Exchange Solution brought to you by