+ Reply to Thread
Results 1 to 8 of 8

Common formula for different Cases

  1. #1
    Forum Contributor
    Join Date
    05-30-2023
    Location
    INDIA
    MS-Off Ver
    OFFICE 2016 ver 16
    Posts
    172

    Common formula for different Cases

    Dear Experts

    There are four difference examples but answer should be same If the value of C4 is high then C4/C5 will be the answer and
    if the value of C5 is higher then C5/C4 will be the answer.
    I need a common formula for both the cases.
    Experts Please help !
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Common formula for different Cases

    try this

    =IFERROR(IF(C4>C5,(C4/C5)-1,(C5/C4)-1),1)

    and copy as appropriate and paste
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Common formula for different Cases

    Another way:

    =IFERROR(MAX(C4:C5)/MIN(C4:C5)-1,1)

    Hope this helps.

    Pete

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Common formula for different Cases

    If you are calculating variance % for say This Year (TY) and Last Year (LY), then the base should always be Last Year (LY). So, if 1st row is TY figure and 2nd row LY figure, then the variance % should be (TY-LY)/LY or TY/LY-1.

    Use this formula: =IF(C5=0,100%*SIGN(C4),(C4-C5)/ABS(C5)).
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-30-2023
    Location
    INDIA
    MS-Off Ver
    OFFICE 2016 ver 16
    Posts
    172

    Re: Common formula for different Cases

    Dear Alansidnan
    Thanks for the Help

  6. #6
    Forum Contributor
    Join Date
    05-30-2023
    Location
    INDIA
    MS-Off Ver
    OFFICE 2016 ver 16
    Posts
    172

    Re: Common formula for different Cases

    Dear Pete

    Thanks for the Help

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Common formula for different Cases

    Dear Josep its not working for second case Pete and alan solve it Thanks for the Reply
    Thanks for the Rep. It would be good if you can share with us what you are comparing.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Common formula for different Cases

    Thanks for the Rep

+ 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. The common formula used for the different cases.
    By RUPESHRH in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2024, 11:14 AM
  2. One Formula for Different Cases
    By RUPESHRH in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-27-2023, 11:32 AM
  3. [SOLVED] Sum formula with multiple cases (Filters)
    By tucharrito in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-11-2020, 05:23 PM
  4. [SOLVED] Formula/Identifying Cases
    By Darko_Giac in forum Excel General
    Replies: 6
    Last Post: 10-09-2015, 01:32 PM
  5. [SOLVED] Compact formula for different cases
    By euklid123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-17-2015, 05:11 AM
  6. [SOLVED] Formula Behaving Badly in Two cases
    By glaskow4 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-17-2015, 03:54 PM
  7. Add cases opened and closed for each month and specifics about the cases.
    By ChrisLaRoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-04-2014, 08:19 PM

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