+ Reply to Thread
Results 1 to 5 of 5

Looking up multiple values and totaling into one cell, using drop down lists

  1. #1
    Registered User
    Join Date
    08-11-2007
    Posts
    51

    Looking up multiple values and totaling into one cell, using drop down lists

    In a nutshell, what I am trying to do is count multiple values on a sheet and place them into one cell on another sheet in the workbook. Then I want to have drop down lists that displays all of the categories, and depending on the category selected from the drop down list it returns the total for that category.

    For example,

    COLUMN A COLUMN B
    TS 5
    SS 10
    ST 4
    TT 4
    SU 0
    TU 8
    TV 0
    TW 1
    TX 23
    TY 7
    TZ 2

    I basically need a formula that would go through that data and take all of my (SS,ST,SU) and sum the total for column b's values. So the end result of a correct formula for this would result in 14.


    Step #2

    I'd like to have a drop down list on a seperate sheet and when I picked a particular category (like Group S) in the drop down list (for example, SS,ST,SU equals Group S) it would display the total amount in the column next to it...total amount being the 14.

    Anyone know how to put this together?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Are all your categories defined by the first letter? If so you could have a dropdown list with each group, e.g.

    Group G
    Group S
    Group T

    Imagine this dropdown was in A1 on sheet2, with data in sheet 1. Then in B1 you could have the formula

    =SUMIF(Sheet1!A:A,RIGHT(A1)&"*",Sheet2!B:B)

  3. #3
    Registered User
    Join Date
    08-11-2007
    Posts
    51
    I've got the basics down, but I'm definitely not as good as everyone on this forum. So could you break down what the formula is doing for me so I can try to put in to use? Thanks for all of the help!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you select say, Group G from the dropdown then this formula

    =SUMIF(Sheet1!A:A,RIGHT(A1)&"*",Sheet2!B:B)

    takes the rightmost character, i.e "G" and finds all the codes in sheet1 column A that begin with that value and sums all the corresponding rows in column B.

    If that doesn't work then I suggest you describe exactly how the codes fall into categories, you said you wanted to sum for SS, ST, SU so I assumed you had groups defined by the first letter. If it isn't as clear-cut as this then you'll probably need to list which codes fall into each category, then you can probably employ a formula which will sum each group.

  5. #5
    Registered User
    Join Date
    08-11-2007
    Posts
    51
    I attached a brieft example....maybe this will help.
    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)

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