+ Reply to Thread
Results 1 to 6 of 6

match sums in 2 column with Sumif returns 0

  1. #1
    Registered User
    Join Date
    04-14-2023
    Location
    Delhi,India
    MS-Off Ver
    web
    Posts
    8

    match sums in 2 column with Sumif returns 0

    sir,
    I have data in 2 columns as under
    B2 842.00
    B3 1435.00
    B4 4,915.00
    B5
    b6
    b7
    B8 [Sum B2:B7] 7,192.00[/FORMULA]

    C2 729.00
    C3 6,463.00


    In C8 I wanted to sum C2:C7, only If the sum is equal to Sum in cell B8.(7192.00)
    as suggested by bing I put the formula in cell C8 (Sumif (B2:B7,B8,C2:C7). It returns 0 despite the fact that all cells are formatted as numeric.
    Please help me as to how I should ensure that sum in cell c8 is equal to sum in cell b8 and it should show only after confirmation.
    thanks



    *

  2. #2
    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: match sums in 2 column with Sumif returns 0

    well your numbers in either or both columns could be text even though they are formatted as numeric, use =isnumber(b2) to see what it returns.

    but this might be an easier formula for what you are trying to do... =IF(SUM(C2:C7)=B8,SUM(C2:C7),0)
    Last edited by Sam Capricci; 04-14-2023 at 08:00 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    04-14-2023
    Location
    Delhi,India
    MS-Off Ver
    web
    Posts
    8

    Re: match sums in 2 column with Sumif returns 0

    Sir Sam Capricci,
    thanks for your prompt reply.
    the if formula suggested by your good self is simple and serves my purpose.
    However, in case of sumif as advised by you, I used =isnumber(B2) and it returns true in this case and all other ceils.
    still the sumif returns 0.00.
    I am enclosing the sheet and shall be thankful the reasons for this for the purpose of learning.
    Attached Files Attached Files

  4. #4
    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: match sums in 2 column with Sumif returns 0

    when you use sumif like that [=SUMIF(D2:D6,B7,B2:B6)] you are saying examine column D rows 2 through 6 for the value found in B7 and if you find it then sum B2 through B6.
    sumif looks at a range - in your example D2 through D6 then look for a criteria - in example B7 then if found in D2 through D6 sum the rows in B2 through B6 that have that value.
    so essentially you are looking for the value of 7192 (in B7) in the rows of D2 through D6 and if you find it, then sum the values in B2 to B6 that correspond to it.

    So if you are trying to find if the sum of the values in col D equal the sum of the values in col B that would be a different formula and that is why your sumif doesn't work in this example.

  5. #5
    Registered User
    Join Date
    04-14-2023
    Location
    Delhi,India
    MS-Off Ver
    web
    Posts
    8
    It definitely helped my understanding. Thanks a lot.
    Last edited by AliGW; 04-17-2023 at 10:28 AM. Reason: Please do NOT quote unnecessarily!

  6. #6
    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
    81,162

    Re: match sums in 2 column with Sumif returns 0

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    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. Table Results - Index Match for Row & Column returns incorrect values
    By matdul01 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-18-2022, 09:43 AM
  2. [SOLVED] If a value in 2 different columns match, it returns the value from the next column
    By t0mrogers in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-30-2020, 01:57 PM
  3. Replies: 2
    Last Post: 10-25-2019, 08:00 AM
  4. Replies: 2
    Last Post: 06-21-2017, 06:32 PM
  5. Question in SUMs & SUMIF
    By robideaux in forum Excel General
    Replies: 26
    Last Post: 06-30-2015, 06:04 AM
  6. [SOLVED] Partial Match in a column that returns the cells to the right.
    By lamenters in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-29-2014, 11:38 AM
  7. [SOLVED] UDF Match functions that returns ROW and COLUMN position
    By CrispinB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-05-2012, 12:44 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