PC Review


Reply
Thread Tools Rate Thread

Changed decimal on fixed numbers

 
 
gump
Guest
Posts: n/a
 
      30th Jul 2009
I've converted a text file into excel and need to change the decimal location
of fixed data. The data I'm trying to change is 331864 to 3318.64 or 51500
to 515.00. No matter what I do I can only get 331864.00 or 51500.00. Can
anyone help
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      30th Jul 2009
Divide by 100.


If this post helps click Yes
---------------
Jacob Skaria


"gump" wrote:

> I've converted a text file into excel and need to change the decimal location
> of fixed data. The data I'm trying to change is 331864 to 3318.64 or 51500
> to 515.00. No matter what I do I can only get 331864.00 or 51500.00. Can
> anyone help

 
Reply With Quote
 
JoeU2004
Guest
Posts: n/a
 
      30th Jul 2009
"gump" <(E-Mail Removed)> wrote:
> The data I'm trying to change is 331864 to 3318.64 or 51500
> to 515.00.


Enter 100 into some cell and copy it. Then select the cells with numbers to
be changed and click Edit > Paste Special > Divide > OK. You might also
need to format the selected cells appropriately, e.g. Number with 2 decimal
places (click Format > Cells > Number).


----- original message -----

"gump" <(E-Mail Removed)> wrote in message
news:B518A301-A0C9-44BF-AC0E-(E-Mail Removed)...
> I've converted a text file into excel and need to change the decimal
> location
> of fixed data. The data I'm trying to change is 331864 to 3318.64 or
> 51500
> to 515.00. No matter what I do I can only get 331864.00 or 51500.00. Can
> anyone help


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      30th Jul 2009
You can't use cell formatting to physically change the value of an entry
(you can only change how it is displayed). There are two methods you can use
to do what you want.

Method 1
=========
Assuming your first piece of data is in A2, put this formula in an unused
column and copy it down

=A2/100

Then select all the values in that column (the one the formula is in) and
copy them, then click on the first data cell and select Edit/Paste Special
from the menu bar, select Values from the Paste section of the dialog box
and click OK. This will physically overwrite whatever is in the original
data cells with the values displayed by the above formula (which you copied
down). You can then format the cells to 2 decimal places if required.

Method 2
=========
This is a VB macro solution and might prove more useful if you will have to
repeatedly do this process in the future. Press Alt+F11 from the worksheet
to go into the VB editor, click Insert/Module once there and copy/paste the
following into the code window that appeared...

Sub StraightenOutNumbers()
Dim C As Range
For Each C In Selection
C.NumberFormat = "0.00"
C.Value = C.Value / 100
Next
End Sub

Go back to your worksheet, select the cells you want to perform the
conversion on, press Alt+F8, select StraightenOutNumbers from the list and
click the Run button.

--
Rick (MVP - Excel)


"gump" <(E-Mail Removed)> wrote in message
news:B518A301-A0C9-44BF-AC0E-(E-Mail Removed)...
> I've converted a text file into excel and need to change the decimal
> location
> of fixed data. The data I'm trying to change is 331864 to 3318.64 or
> 51500
> to 515.00. No matter what I do I can only get 331864.00 or 51500.00. Can
> anyone help


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Numbers Without Fixed Decimal =?Utf-8?B?YmdyYXkxNzk2?= Microsoft Excel New Users 5 20th Mar 2007 05:17 PM
Make decimal work properly in fixed decimal entry in Excel 2003. =?Utf-8?B?am9obmdpaWk=?= Microsoft Excel Crashes 0 12th Apr 2006 06:05 AM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. =?Utf-8?B?U1VLWUtJVFRZ?= Microsoft Excel Misc 3 6th Jul 2005 01:50 PM
setting the decimal variable to include 2 numbers after decimal point? Scott Microsoft VB .NET 1 3rd Mar 2005 10:05 PM
below 0.0001m numbers, decimal in serialization, is bug fixed? Xavier Wargny Microsoft C# .NET 3 24th Dec 2003 03:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:37 AM.