# 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?
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
0
Author Commented:
Kevin:

My data is in B column and all other column have data as well
0
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
0
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.
0
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
0
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
0
ConsultantCommented:
Good point. But he wants it to remain text I believe. So...

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

Kevin
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.