+ Reply to Thread
Results 1 to 4 of 4

TOGGLE between percentage and absolute

  1. #1
    Registered User
    Join Date
    09-04-2021
    Location
    sg
    MS-Off Ver
    2016
    Posts
    2

    Exclamation TOGGLE between percentage and absolute

    Hi all,

    i have a large dataset containing prices of some items from 2017 to 2024. (2022, 2023, and 2024 prices are predicted).
    i need to analyse how these historical and predicted prices compare to the current (2021) price.
    this has to be done both in absolute terms (e.g. 2021 = $100, 2022 = $120) and percentage terms (e.g. 2021 = base, 2022 = 120% of 2021).

    is there a way to create a toggle button (and macro?) that allows me to toggle between absolute and percentage terms for this?

    for example:
    absolute version - 2020 = $80; 2021 = $100; 2022 = $120
    percentage version - 2020 = 80%; 2021 = 100%; 2022 = 120%

    thanks in advance.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: TOGGLE between percentage and absolute

    I'm sure one could create a toggle button with macro to do this, but I would probably not choose that approach. It's probably mostly a question of programmer's and/or user's preference, and you haven't really indicated what preferences you have.

    If I were doing this, I would probably:

    1) Choose a cell for the toggle. Probably a cell at the top of the column, but this depends on exactly how your sheet is arranged.
    2) Choose expected values for the toggle and what they should mean. I would probably simply choose a simple boolean TRUE/1 or FALSE/0 for my toggle values, but you can use whatever makes sense to you. If necessary, apply data validation to this cell so that only the two appropriate values can be entered.
    3) Then, a simple IF() function in the column where the calculation is performed. =IF(absolutereferencetotogglecell=condition,absolutecalculation,percentagecalculation) or whatever makes sense from the toggle values I want to use.

    That's how I would be inclined to do this, but, as noted, a lot of that is programmer's preference. If you would prefer a button with macro solution, that can be done as well.

    Does that help?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    09-04-2021
    Location
    sg
    MS-Off Ver
    2016
    Posts
    2

    Re: TOGGLE between percentage and absolute

    Yes, that is actually quite helpful. Thanks for this! Toggles can get complicated and laggy.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: TOGGLE between percentage and absolute

    Administrative Note:

    Welcome to the forum.

    Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.

    With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).

    Thank you for helping us to help you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Shortcut to toggle absolute $
    By lsmft in forum Excel General
    Replies: 2
    Last Post: 11-11-2007, 05:26 PM
  2. [SOLVED] F4 key does not toggle relative/absolute cell references.
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 03:05 PM
  3. [SOLVED] F4 key does not toggle relative/absolute cell references.
    By java in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. [SOLVED] F4 key does not toggle relative/absolute cell references.
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  5. [SOLVED] F4 key does not toggle relative/absolute cell references.
    By java in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. [SOLVED] F4 key does not toggle relative/absolute cell references.
    By java in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. [SOLVED] F4 key does not toggle relative/absolute cell references.
    By java in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  8. [SOLVED] F4 key does not toggle relative/absolute cell references.
    By java in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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