+ Reply to Thread
Results 1 to 2 of 2

How to change number of decimal places in already calculated value.

  1. #1
    Registered User
    Join Date
    07-06-2011
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    20

    How to change number of decimal places in already calculated value.

    Alright, I have hit a snag in a short macro I am trying to make. I am taking an average of a range of numbers and then putting it into a cell.
    When the average is calculated it only shows up with 2 sig figs. For example 29 instead of 29.3459.

    The code I am using simplified looks like this.

    Please Login or Register  to view this content.
    I'm sure this is a stupid way to do it, but having no previous knowledge this is the best I could come up with.

    The result I am getting however gives me a result of 94.0000 instead of 93.6738.

    Thanks for the help!

  2. #2
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: How to change number of decimal places in already calculated value.

    May be you have defined EastAve as an integer? try:

    Please Login or Register  to view this content.
    Note: Untested code
    Regards,
    Vandan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1