+ Reply to Thread
Results 1 to 3 of 3

Lookup multiple values using a single word, retrieve values, sum, then divide by 20

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    16

    Lookup multiple values using a single word, retrieve values, sum, then divide by 20

    Hello all

    As you may (or may not!) guess from the title above, I am attempting to create a rather complex (at least I think it is) formula which does the following:

    I have worksheet 'A' which contains three columns: Column A - a list of names (eg. John Smith); Column B - a role-title for each name (eg. Plumber); and Column C - a list of days worked next to each name (eg. 20).

    In worksheet 'B', I want to run a formula which looks up a given value (eg. Plumber) and searches for all instances of this value in Worksheet 'A' (so, all of the Plumbers), and then totals all of the days worked for the plumbers. When this is done, I want to divide the total figure by 20, and display this final result in the cell.

    The key thing I'm trying to do here is be able to search for a value, and retrieve that value even if it is nestled in a larger value. So if I search for 'plumber', I want to be able to retrieve the days worked for a resrouce who is listed as 'plumber', 'senior plumber', 'junior plumber'.

    As always, your help will be deeply appreciates.

    Many thanks in advance

    Shaun G

  2. #2
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: Lookup multiple values using a single word, retrieve values, sum, then divide by 20

    Assume on worksheet 'B' cell A1='plumber', on cell B1:
    Please Login or Register  to view this content.
    or use this if you want search "plumber" on every row (plumber, senior plumber, junior plumber)

    Please Login or Register  to view this content.
    Note : array formula, use ctrl+shift+enter
    Last edited by SDCh; 03-22-2013 at 07:46 AM.
    Click (*) if you received helpful response.

    Regards,
    David

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Lookup multiple values using a single word, retrieve values, sum, then divide by 20

    Suppose you have Plumber in A2 of Sheet B - then you can have this formula in B2 of that sheet:

    =SUMIF('A'!B:B,"*"&A2&"*",'A'!C:C) / 20

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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