+ Reply to Thread
Results 1 to 4 of 4

Un-rounding fractions...?

  1. #1
    Registered User
    Join Date
    03-09-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    2

    Un-rounding fractions...?

    Hi all

    I've come across something i excel that I can't seem to work around... I'm currently programming a dashboard for quality control (a P-chart), that I need to display the weekly quality as fractions in stead of percentages. That because, I want people to be able to see the sample size. If 30 specimens have been controlled and 3 were bad, I need excel to return the value 3/30. Excel automatically rounds this fraction to 1/10. How can I get around this?


    Below, the chart (the circled value SHOULD be 9/30 and not 3/10)

    ---DASH___.jpg

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Un-rounding fractions...?

    If you format the data as fractions, doesn't that show as fractions in the chart?

  3. #3
    Registered User
    Join Date
    03-09-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Un-rounding fractions...?

    It does, as is visible from the attached picture, the problem is the rounding.

    If 10 out of 30 possibilities are defects, I want the chart to NOT round the fraction to 1/3 - I need it to appear like this: 10/30, so that the sample size is visible to the reader.

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Un-rounding fractions...?

    I think you need to use VBA to change the labels. Something like this:

    Please Login or Register  to view this content.
    Note that you will likely need to change a few things:
    "Chart 1" to the name of your chart
    SeriesCollection(1) to the series that you want to label. (An easy way to find this is to record a macro and move one of the data labels. then undo the move).
    The 'Range("D"&lcv)....' assumes the numerators and denominators are in their own column (D and E, respectively) and start in row 1

    Pauley

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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