Closed Thread
Results 1 to 10 of 10

Dynamic chart axis format (Numbers and Percentages)

  1. #1
    Registered User
    Join Date
    09-26-2017
    Location
    Oslo
    MS-Off Ver
    2016
    Posts
    7

    Post Dynamic chart axis format (Numbers and Percentages)

    Hi!
    R5zkdDR.jpg

    As you can see on Before and After. a value in cell B4 can be selected from the dropdown list. Some of the ratios are percentages and others are numbers. I want the chart to adopt the changes in the formatting. I have mannually formatted the secondary axis to display percentages in the After sheet. I want the chart to dynamically change its formatting of the axis.
    Attached Files Attached Files
    Last edited by myurathan; 09-26-2017 at 05:52 AM. Reason: Attaching excel file

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    2016
    Posts
    3,834

    Re: Dynamic chart axis format (Numbers and Percentages)

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,134

    Re: Dynamic chart axis format (Numbers and Percentages)

    Hi,

    Can you not format the Axis as percentage?

    1. Right Click on the Axis
    2. Format Axis
    3. Go down to "Numbers" on the Axis Options tab
    4. Select "Percentage" from the Category dropdown
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    09-26-2017
    Location
    Oslo
    MS-Off Ver
    2016
    Posts
    7

    Re: Dynamic chart axis format (Numbers and Percentages)

    Quote Originally Posted by cbatrody View Post
    Hi,

    Can you not format the Axis as percentage?

    1. Right Click on the Axis
    2. Format Axis
    3. Go down to "Numbers" on the Axis Options tab
    4. Select "Percentage" from the Category dropdown
    My axis changes as I change the ratio from drop down list. If I select current ratio it should display 1.96 not 196%. I want it to dynamically change according to my selection.

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,134

    Re: Dynamic chart axis format (Numbers and Percentages)

    I guess you would have to define 'named ranges' to achieve what you are looking for.

    Please go through the below URLs for more details on the same:


    https://stackoverflow.com/questions/...-to-chart-axis

    https://www.excelforum.com/excel-cha...er-format.html

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    2016
    Posts
    3,834

    Re: Dynamic chart axis format (Numbers and Percentages)

    Ok here we go.

    First put % and Number in each row column K in sheet Ratio

    In before sheet

    A4
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Change C4 formula as below.

    =IF($A4="Number",INDEX(Ratio!$C$3:$J$38,MATCH($B$4,Ratio!$B$3:$B$38,0),Ratio!C1)*10,INDEX(Ratio!$C$3:$J$38,MATCH($B$4,Ratio!$B$3:$B$38,0),Ratio!C1))

    Change the Axis format code as below.

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Check the attached file

    Hope this will help.

    PS. I have worked in Beforesheet.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-26-2017
    Location
    Oslo
    MS-Off Ver
    2016
    Posts
    7

    Re: Dynamic chart axis format (Numbers and Percentages)

    Thank you so much shukla.ankur281190. May I know why you have multiplied by 10. Since you have multiplied by 10, the graph does not represent the correct values. For example, current ratio suppose to be 1.37, but the graph represents 13.7

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    2016
    Posts
    3,834

    Re: Dynamic chart axis format (Numbers and Percentages)

    Dividing by 10 means to create difference between numbers and percentage value.

    you will have to change C4 formula as below.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And do changes in formatting as number is supposed to come according pre fixed digit

    [<1]##%;[>1]0.0,

  9. #9
    Registered User
    Join Date
    02-25-2021
    Location
    Austin, TC
    MS-Off Ver
    2013
    Posts
    2

    Re: Dynamic chart axis format (Numbers and Percentages)

    Now is it possible to add a third format? While numbers, percentage and currency? Thanks, John

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,079

    Re: Dynamic chart axis format (Numbers and Percentages)

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 06-13-2017, 12:32 PM
  2. Help with custom format for axis numbers in chart
    By karl-eQ in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-12-2017, 01:01 PM
  3. Dynamic Chart: Variable Y-Axis Number Format?
    By tgallag1 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 01-19-2015, 05:45 PM
  4. [SOLVED] Format numbers on the x-axis of Chart
    By maacmaac in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2014, 03:31 PM
  5. Legend Only Shows Used Axis on Dynamic Chart (X, Y and Y2 axis)
    By TEBrown in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 06-21-2012, 10:15 AM
  6. Bar chart with percentages and numbers
    By Paul-NYS in forum Excel General
    Replies: 9
    Last Post: 01-26-2012, 11:19 AM
  7. chart with dynamic x axis
    By name in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-04-2006, 10:45 AM

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