Solved

Excel Number formatting issue

Posted on 2014-01-01
5
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 39750743
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
ID: 39750777
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
ID: 39750792
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
ID: 39750794
Never mind me Pratima already posted this. This is why you should work on one thing at a time .

Haha
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39752885
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

733 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