+ Reply to Thread
Results 1 to 3 of 3

Wrong Sum-up values from a range with xlookup and index+match formula

  1. #1
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520

    Wrong Sum-up values from a range with xlookup and index+match formula

    Hi everyone!

    Good day!

    I have an issue having the correct summation for the ranges with xlookup or index+match formulas. the below screenshot , if you can see the total for the those values from 1-31, the correct answer when summed up is 47:26:59, it gives me an incorrect answer. Do you have any idea why?

    this is what my formula from 1 to 31, referencing the column heading.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    thanks in advance, i have attached an excel file for fast reference
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by corinereyes; 11-20-2023 at 05:19 PM.
    Corine

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

    Re: Wrong Sum-up values from a range with xlookup and index+match formula

    The current formula using the SUMIF() function =SUMIF(E5:AJ5,0,E5:AJ5) is summing all of the entries where the value is 0. Of course, when you sum a bunch of 0 values, you get 0.

    I edited the function to sum when the value is greater than 0 =SUMIF(E5:AJ5,">0",E5:AJ5) and that seemed to fix the summation issue. I noted that your "time of day" format h:mm:ss displayed 23:26:59, so I formatted as elapsed hours [h]:mm:ss to get the display to show 47:26:59.

    I would also note that 0 does not affect a sum, so I also tried copying the SUM() function in the row below, and that also worked =SUM(E5:AJ5) (again, formatted as elapsed hours).

    Is that what you are looking for?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520

    Re: Wrong Sum-up values from a range with xlookup and index+match formula

    HI MrShorty,

    Good evening to you! The suggestion works perfect! tried this already =SUMIF(E5:AJ5,">0",E5:AJ5) , however [h]:mm:ss this fixed the issue! Thank you so much!
    Last edited by AliGW; 11-21-2023 at 01:28 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

+ 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: 11
    Last Post: 04-14-2023, 12:50 PM
  2. Replies: 28
    Last Post: 08-27-2022, 10:18 AM
  3. [SOLVED] XLookup returning wrong values when using two conditions
    By Einrastor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2020, 07:38 AM
  4. Index Match Formula to Sum a range of values
    By kocs in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-15-2019, 04:57 PM
  5. Index Match returning wrong values
    By CoachK88 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-03-2018, 12:48 AM
  6. [SOLVED] Index Match function returning wrong values sometimes
    By Dord25 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-19-2018, 09:18 PM
  7. [SOLVED] Help-> Index+Match formula pulling wrong values
    By sashafierce in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-29-2013, 07:13 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