Excel Number Formatting

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?
Who is Participating?
zorvek (Kevin Jones)Connect With a Mentor ConsultantCommented:
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

Michael V BernotCommented:
Hello mikemomyer,
      There is also a way to change the numbers to the way they are displayed:

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.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.