Solved

Excel Number Formatting

Posted on 2007-03-30
2
1,147 Views
Last Modified: 2011-09-20
I am formatting data in an excel worksheet that will eventually be exported into a database.  I have a column of numbers that are for example 0.002563589623.  I need to shorten those to 0.0026.  When I use the format number option, it appears to be correct but in the formula bar it appears as original.  Is there a simple way to shorten the number completely without retyping the entire 14,000 cells?
0
Comment
Question by:mikemomyer
[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
2 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 125 total points
ID: 18824805
I would not recommend doing that but, if you really want, here is macro that will round the selected cells:

Public Sub RoundNumbers()

   Dim Cell As Range
   
   For Each Cell In Selection
      Cell = Round(Cell, 4)
   Next Cell

End Sub

Kevin
0
 
LVL 5

Expert Comment

by:Michael V Bernot
ID: 18830692
Hello mikemomyer,
      There is also a way to change the numbers to the way they are displayed:

Tools---Options---Calculation-----
Under Workbook Options
Check the box ---->Precision as Displayed.

 You will get a warning, but the numbers will be shown as you have them displayed.  Good Luck.

MVB



0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

623 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