+ Reply to Thread
Results 1 to 6 of 6

Lookup/Sum Help

  1. #1
    Registered User
    Join Date
    06-10-2014
    MS-Off Ver
    Microsoft 365
    Posts
    25

    Lookup/Sum Help

    Hi,

    I'm hoping someone can help me with a query.

    I have a spreadsheet that contains two worksheets. Example data is below.

    Data.jpg

    The first four columns are on "Sheet1" and the other two columns are on "Sheet2"

    What I'm trying to do is get a filtered list of the data on "Sheet1" and then using the "Work Type" of the filtered list, return a sum of the values in "Sheet2".

    For Example:

    Using the Filter formula "=FILTER(B:D,(B:B="Group 2")*(C:C=DATE(2024,11,17)))"

    I would get a filtered set of data as follows:

    Group 2 17/11/2024 D5
    Group 2 17/11/2024 D5
    Group 2 17/11/2024 D3

    I would then use the "Work Type" of the filtered results to lookup the "Work Type" on "Sheet2" and return a sum based on the values in Column B.

    In the case of my example, D5 = 11.00 (x2) and D3 = 15.00, so the returned result would be 37.

    I don't need to see the filtered results, I just need them in order to get a filtered list of the "Work Types".

    I'm not sure if the Filter Function can be used to do what I want, so if anyone has any other suggestions about how I can achieve the desired result, that would be great. Ideally I'd like to avoid using VBA, if possible.

    Thanks in advance.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,085

    Re: Lookup/Sum Help

    update your profile to show what version of excel you are using
    also
    Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet.

    A sample sheet would help here, and possibly will enable a quicker and more accurate solution for you.


    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,179

    Re: Lookup/Sum Help

    Hi,
    I helped you (this time) with the sample data and created a mock up in excel,

    Try this for the filter:


    =FILTER(C4:E9,C4:C9="Group 2 ")

    This for the SUM:
    =SUM(XLOOKUP(FILTER(E4:E9,C4:C9="Group 2 "),G4:G7,H4:H7))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-10-2014
    MS-Off Ver
    Microsoft 365
    Posts
    25

    Re: Lookup/Sum Help

    Thanks for the responses.

    Apologies that I didn't upload a workbook. I normally would, but had a lot on that day and wasn't thinking. My bad!

    The formula you sent over Limor_OP worked a treat. Thank you.

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

    Re: Lookup/Sum Help

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon (Next to 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 those who helped.
    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

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,179

    Re: Lookup/Sum Help

    You're welcome.

+ 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 Wild Card - Lookup value is full text and lookup array is partial
    By AccountantwExcelQs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-23-2024, 07:16 PM
  2. [SOLVED] Lookup: Lookup employee id and return value in cell x basued on most recent start date
    By jekeith in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-21-2018, 12:56 PM
  3. Two Lookup and Return (Lookup the column, then lookup the row)
    By Branbran10 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-05-2015, 04:55 PM
  4. Replies: 4
    Last Post: 05-19-2015, 08:42 PM
  5. Replies: 3
    Last Post: 04-08-2014, 03:11 AM
  6. Replies: 2
    Last Post: 05-19-2013, 08:46 AM
  7. Replies: 7
    Last Post: 06-19-2011, 12:51 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