Solved

Excel Number formatting issue

Posted on 2014-01-01
5
235 Views
Last Modified: 2014-01-29
Hi

I receive extracted data from system into Excel. The issue that I want the decimal after last 2 digits.

Example :
Extracted number : 756123765
I want : 7,561,237.65

when I use (add ,00 in the ribbon)  it become : 756,123,765.00 which is wrong.
example1.xlsx
0
Comment
Question by:amq10
5 Comments
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
Hello,

as I understand it you want the last two digits to become the decimals of a number.  You can do this by dividing the number by 100. In your example, the number is stored as text and a formula will also result in text. So, make sure to store the number as a real number before applying formulas.

Just for fun, you could also try this formula:

=(LEFT(A1,LEN(A1)-2))+0+(RIGHT(A1,2)/100)

This formula will work with any figure showing three or more numbers.

Format the result to show thousand separators and two decimals.

cheers teylyn
0
 
LVL 39

Expert Comment

by:Pratima Pharande
Comment Utility
appl y formula on Cell  =A1/100

and then add formating style as Comma from Cell styles

see attchment
excel.jpg
0
 
LVL 9

Expert Comment

by:jeff_01
Comment Utility
Another way is to divide by 100.

=(A1/100)

You will still need to format the cell to include separators using the format code below.

#,###.00
0
 
LVL 9

Expert Comment

by:jeff_01
Comment Utility
Never mind me Pratima already posted this. This is why you should work on one thing at a time .

Haha
0
 
LVL 80

Accepted Solution

by:
byundt earned 500 total points
Comment Utility
If you find yourself needing to do this kind of thing on a regular basis, here is a macro to automate the process. To use it, first select the cells to be modified, then run the macro. Blank cells and cells containing non-numeric text will be ignored.
Sub DivideBy100()
Dim n As Long
Dim ar As Range, rg As Range
Application.ScreenUpdating = False
Set rg = Selection
With Cells(Rows.Count, 1)
    .Value = 100
    .Copy
    For Each ar In rg.SpecialCells(xlCellTypeConstants)
        ar.PasteSpecial Paste:=xlPasteValues, Operation:=xlDivide, SkipBlanks:=True, Transpose:=False
    Next
    rg.NumberFormat = "#,##0.00"
    .EntireRow.Delete
    n = rg.Worksheet.UsedRange.Rows.Count
End With
End Sub

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 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

10 Experts available now in Live!

Get 1:1 Help Now