Formulas-Making a number a standard amount of digits

S

Stiller312

I am wondering how to make cells in a formula automatically 4 digits long?
The actual formula I am using is "=$B$6 & "-" & A15 & "-" & B15 & "-" & C15".
If the C15 cell is say, "003", in the formula it comes out "3". I need 3
digits for the last part of the whole formula in the column. Any help would
be greatly appreciated! Thanks!

Tim
 
R

Ron Coderre

Try this:

=$B$6&"-"&A15&"-"&B15&"-"&TEXT(C15,"000")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
S

Stiller312

Wonderful, Thanks!

Ron Coderre said:
Try this:

=$B$6&"-"&A15&"-"&B15&"-"&TEXT(C15,"000")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 

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