+ Reply to Thread
Results 1 to 11 of 11

Adding result if totals are equal

  1. #1
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Adding result if totals are equal

    Good morning,

    I have the following simple formula that works out which is the greater amount, the first 9 cells or second 9 cells.

    =IF(D5+F5+H5+J5+L5+N5+P5+R5+T5>V5+X5+Z5+AB5+AD5+AF5+AH5+AJ5+AL5,"F","B")

    Unfortunately it returns "B" if the total are equal. What can I add to the formula to show if the totals are ever equal please? I'd probably have "E" as the result.

    Many thanks.
    Last edited by Marvo; 02-13-2022 at 08:04 AM.

  2. #2
    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,903

    Re: Adding result if totals are equal

    Try this:

    =IF((D5+F5+H5+J5+L5+N5+P5+R5+T5)>(V5+X5+Z5+AB5+AD5+AF5+AH5+AJ5+AL5),"F",IF((D5+F5+H5+J5+L5+N5+P5+R5+T5)=(V5+X5+Z5+AB5+AD5+AF5+AH5+AJ5+AL5),"E","B"))

    I'll bet this could be simplified with SUMIFS, but I'd need to see it in context.
    Last edited by AliGW; 02-13-2022 at 07:19 AM. Reason: Typo fixed.
    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.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Adding result if totals are equal

    this seems easier... =IF((D5+F5+H5+J5+L5+N5+P5+R5+T5)>(V5+X5+Z5+AB5+AD5+AF5+AH5+AJ5+AL5),"F","B")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  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,903

    Re: Adding result if totals are equal

    But it doesn't do what is required ...

  5. #5
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Adding result if totals are equal

    By all means Ali.

    The formula is in AO5.

    Can anything also be added to produce no result (blank cell) when no data is entered when the formula is copied down ? As in cell AO96.
    Attached Files Attached Files

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Adding result if totals are equal

    Should've read it more closely, I see your point.

  7. #7
    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,903

    Re: Adding result if totals are equal

    Try this:

    =IF(SUMIF($C$4:$T$4,"Pts",$C5:$T5)=SUMIF($U$4:$AL$4,"Pts",$U5:$AL5),"E",IF(SUMIF($C$4:$T$4,"Pts",$C5:$T5)>SUMIF($U$4:$AL$4,"Pts",$U5:$AL5),"F","B"))
    Attached Files Attached Files
    Last edited by AliGW; 02-13-2022 at 07:46 AM.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Adding result if totals are equal

    ... or

    =IFERROR(LOOKUP(SUMIF($C$4:$T$4,"Pts",C5:T5)/SUMIF($U$4:$AL$4,"Pts",U5:AL5),{0,1,1.00000001},{"B","E","F"}),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  9. #9
    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,903

    Re: Adding result if totals are equal

    Nice idea!

  10. #10
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Adding result if totals are equal

    That works a treat Glenn, thank you and thanks to everybody else.

    I'd just been playing with the =IF(OR(ISBLANK) function on Ali's formula and got it to work but yours is a shorter solution. Cheers.

  11. #11
    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,903

    Re: Adding result if totals are equal

    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. Replies: 3
    Last Post: 11-09-2021, 05:24 PM
  2. [SOLVED] How to check if matrix column and row totals are equal
    By lollipop25 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2019, 09:26 AM
  3. [SOLVED] Totals are not Equal??
    By Patish in forum Excel General
    Replies: 2
    Last Post: 03-08-2019, 12:05 PM
  4. [SOLVED] Percentage of two totals not equal to average percent of each month
    By Berqlind in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2018, 06:55 PM
  5. [SOLVED] Identify Equal & Opposing Sign Totals
    By jewelsharma in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-17-2016, 03:51 AM
  6. formula that pulls totals only if total is equal or less than $1
    By TAMMY32 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-18-2014, 06:50 PM
  7. Do Loop Until result equal 0
    By MaxJan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2012, 06:03 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