+ Reply to Thread
Results 1 to 9 of 9

Matching lists with a function

  1. #1
    Registered User
    Join Date
    04-25-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 2002
    Posts
    33

    Matching lists with a function

    Hello,

    Background:

    I am working in Excel with two tables.

    In one table I have the portfolio weight and industry of different companies in a fund.

    In the other table I have the industry of companies. And in another column Im trying to sum the weights of companies for that specific industry.

    Function Im using:
    =SUMIF(P4:P9;P4=C7;C6:I6)

    Where P4:P9 is the list of industries.
    P4 is the first industry in the second list.
    C7 is industry in the first list.
    C6:I6 is the weights of the companies in the portfolio.

    Although its not working. How can I improve?
    Attached Files Attached Files
    Last edited by Peter Niklas; 11-14-2020 at 03:09 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: Function

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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

  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,726

    Re: Function

    I see you have changed your title, but it would also help if you attached a sample Excel workbook - see the yellow banner at the top of the screen for details of how to do this.

    You quote this formula:

    =SUMIF(P4:P9;P4=C7;C6:I6)

    but the term in the middle (shown in red) is not syntactically correct - it should be a single value which the first range is compared to for each cell in turn.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    04-25-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 2002
    Posts
    33

    Re: Function

    Hello!

    I have made a sample excel with what im trying to do.
    In the yellow cells im trying to sum the weights of companys given their industry.

  5. #5
    Registered User
    Join Date
    04-25-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 2002
    Posts
    33

    Re: Function

    Quote Originally Posted by Pete_UK View Post
    I see you have changed your title, but it would also help if you attached a sample Excel workbook - see the yellow banner at the top of the screen for details of how to do this.

    You quote this formula:

    =SUMIF(P4:P9;P4=C7;C6:I6)

    but the term in the middle (shown in red) is not syntactically correct - it should be a single value which the first range is compared to for each cell in turn.

    Hope this helps.

    Pete
    Please see the file I uploaded.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Matching lists with a function

    How about
    =SUMIF($G$4:$O$4,B4,$G$3:$O$3)

  7. #7
    Registered User
    Join Date
    04-25-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 2002
    Posts
    33

    Re: Matching lists with a function

    Thank you worked perfectly.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: Matching lists with a function

    If 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 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.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Matching lists with a function

    You're welcome & thanks for the feedback.

+ 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. Right function, Left function, Mid function to extract values in column A
    By bjnockle in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-14-2020, 03:14 PM
  2. Replies: 0
    Last Post: 07-07-2018, 04:13 AM
  3. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  4. Replies: 2
    Last Post: 04-23-2017, 12:04 AM
  5. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  6. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  7. Replies: 1
    Last Post: 03-21-2012, 11:22 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