Solved

Remove decimals from a number and return in specific format

Posted on 2014-09-23
3
98 Views
Last Modified: 2014-09-23
I need to take the values in a column that contains numbers with and without decimals and return them in the following format:

Cell Value:         Result Needed: (zero filled on the left, four characters total)
1.8                        0180
2                           0200
.25                        0025
0
Comment
Question by:BEBaldauf
3 Comments
 
LVL 31

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 40339465
Assuming values in column A, in column B enter formula:

=A1*100

Then format with custom format "0000".

Or if not needed for onward calculations, you can use:

=TEXT(A1*100,"0000")

This latter option has no need for custom format.

Thanks
Rob H
0
 
LVL 7

Expert Comment

by:Robby Swartenbroekx
ID: 40339469
make in column B a formula =TRUNC(A1*100;0) and make the view 0000 instead of 0
0
 

Author Closing Comment

by:BEBaldauf
ID: 40339484
Thanks Rob!  The latter option you provided is perfect for the concatenation I'm trying to kluge together!
appreciate your simple, quick solution!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now