+ Reply to Thread
Results 1 to 3 of 3

Trying to use XLOOKUP and SUMIF function together

Hybrid View

  1. #1
    Registered User
    Join Date
    02-26-2024
    Location
    Australia
    MS-Off Ver
    Excel 365 online version
    Posts
    6

    Trying to use XLOOKUP and SUMIF function together

    hi all

    I have tried a few ways to do the task with either sumif or sumifs but they dont work for me. My excel version would be EXCEL 365 ONLINE. As you can see in the photo, my task is trying to sum up the values of the total heads based on the DATE and CUSTOMER.

    As you can see in the sheet, the rows on the left hand side highlighted with yellow will keep elaborating as the time goes on, and the columns on the right hand side which are highlighted in blue and black are the summary of each day in each week. I know the data can be summarized by using a pivot table but none of my colleagues know how to use a pivot table so my boss wants me to design a simple sheet for them. The cell in black colour is supposed to show the number of total heads for the company named "Hydro Produce" ; while the cell in blue should show the sum of the total head numbers for the rest of the company. Please note that the summary of the total head should only include the number on that specific date. I have tried something like =Sumifs(sumrange, criteria1(A:A), criteriavalue(Monday,1 July 2014), criteria2(B:B), criteria value("<>Hydro Produce") but the cell returned Spill value. I am thinking of combining XLOOKUP and SUMIF to do the job instead but dont know where to start.

    Really appreciate anyone that is able to help. Thank you!!
    Attached Images Attached Images
    Attached Files Attached Files

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

    Re: Trying to use XLOOKUP and SUMIF function together

    The simplest way to do this is H2:
    =SUM(FILTER($E$2:$E$20,($B$2:$B$20="Hydro Produce")*($A$2:$A$20=G2)))

    H3:
    =SUM(FILTER($E$2:$E$20,($B$2:$B$20<>"Hydro Produce")*($A$2:$A$20=G3)))

    select BOTH cells and copy down.

    Change the 20 to something sensible, but future-proof. Do NOT use whole columns unless you have close to 1,000,000 rows of data.
    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

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

    Re: Trying to use XLOOKUP and SUMIF function together

    Ignore that... I'm not awake yet.

    =SUMIFS(E:E,B:B,"Hydro Produce",A:A,G2)

    and

    =SUMIFS(E:E,B:B,"<>Hydro Produce",A:A,G3)

    select both. Copy down.
    Attached Files Attached Files

+ 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. Xlookup and Sumif
    By mjack7 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-04-2022, 10:00 PM
  2. Replies: 2
    Last Post: 03-04-2022, 01:18 AM
  3. [SOLVED] xlookup, sumif and trend functions for particle size distribution calculation
    By Ramish in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-16-2022, 06:28 AM
  4. Replies: 7
    Last Post: 12-10-2021, 02:17 PM
  5. [SOLVED] Combing SUMIF SEARCH and XLookup
    By Dustychops in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2021, 02:24 PM
  6. [SOLVED] Sum cell dependant on Ratio with XLOOKUP and SUMIF
    By dharvey1978 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2021, 10:11 AM
  7. Can xlookup function be used in VBA?
    By jaryszek in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2020, 02:20 AM

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