Zeros in Formula Bar

S

scottdog129

I have a worksheet and I need to preserve the zeros in front of numbers in
the formula bar, but I cant seem to get them to show up. How do I do this?
They are in the cell, but not the formula bar?

TIA

Scott T.
 
G

Gary''s Student

If leading zeros appear in the cell, but not the formula bar, then they
result from formatting. They ae not actually in the data.

If you require them in the formula bar (not a normal requirement) precede
the value with an apostrophe (single quote).
 
S

scottdog129

Ill use a little more detail so, maybe, you can see what Im trying to
accomplish. I have data sent to our company in an Excel worksheet. In this
worksheet, there is a column that is a matter number, or file number. In
most cases, the number looks similar to 01234.0001. There are other numbers
in other cells that look a little different, like 123456.0000.

The problem we are finding is that, when we import this data into our SQL
database that runs our records management software, the zero in front of the
number isnt making it into the database. Its being dropped off. This is bad
because the client needs that zero there.

Is this happening in Excel BEFORE the import, or is this happening DURING
the import?
 
G

Gord Dibben

The cells with the leading zeros are formatted to display a leading zero.

The zero does not actually exist in the cell so when you export you will
export the actual value of 1234.0000

For exporting to a DB that needs the leading zero, in a helper cell enter

=TEXT(A1, "00000.0000"

Copy and paste special(in place) as Values


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top