+ Reply to Thread
Results 1 to 10 of 10

Lookup one value and sum multiple coumns

  1. #1
    Registered User
    Join Date
    10-27-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Lookup one value and sum multiple coumns

    Hi, Please help me figure out how to modify the formula on the attached file. I wanted to look for the value in B column from array HH:SS. Then sum up the value in H,J,L and N. I don't know if I explained my problem clearly here but you will understand my problem if you open the attached file. Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Lookup one value and sum multiple coumns

    hi jrazolove. so the answer for Student 1 is 4? try copying this formula, paste inside the formula bar of C7
    =SUM(IF($G$7:$G$91=B7,$H$7:$N$90))
    press CTRL + SHIFT + ENTER to confirm

    it'll ignore all the text in between & sum up just the numbers
    Attached Files Attached Files
    Last edited by benishiryo; 10-27-2012 at 09:05 PM. Reason: added file

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Lookup one value and sum multiple coumns

    In C7: =SUM(H7,J7,L7,N7)

    copy down

  4. #4
    Registered User
    Join Date
    10-27-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Lookup one value and sum multiple coumns

    Hi Benishiryo,
    I tried to press ctlr shift center but it does not calculate. The formula is shown. There is icon to show the formula so I hit it and the cell just becomes wider. Please see the updated file.. Please advise.. Thank you..
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-27-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Lookup one value and sum multiple column

    Hi Teethless Mama,
    I want to use a dynamic formula so that when I change the table or add entry or sort out the data, I don't need to recalculate again. That's why I don't want to you =sum(h7,j7,l7,n7) ..

  6. #6
    Forum Contributor
    Join Date
    10-26-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: Lookup one value and sum multiple coumns

    Benishiryo,
    The formula =SUM(IF($G$7:$G$91=B7,$H$7:$N$90)) will save me 8 hours or more... Thank you
    I have probably last issue. I wanna count the no of Y that match my criteria. I have inputted this formula =if(=(HLOOKUP(B7;G6:S90;5;FALSE);=(COUNTIFS(I:I;"y");"").. It didn't work tho. Please advise..File is attached for your reference... Thank you
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-26-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: Lookup one value and sum multiple coumns

    Hi Benishiryo,

    I'm sorry I did not make myself clear.. I have attached a new file. It explains exactly what I'm currently doing which works fine but it's not fun if doing it like 400 times. I wish you could help me automatize like the earlier formula you gave me. Thank you again..
    Attached Files Attached Files

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Lookup one value and sum multiple coumns

    just so that everyone is aware, jewellove and jrazolove are the same person. they informed me that they had a problem and had to re-register
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Forum Contributor
    Join Date
    10-26-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: Lookup one value and sum multiple coumns

    Yes, it is one person and I informed some of your moderators about it.. I'm a first timer here. I could not find the post new icon until today. I was in a hurry to post my second problem that I decided to create a new. I beg you not to delete the other account until it is solved as there are some good guys who are working on it.. Thank you.. So sorry again.. :'(

  10. #10
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Lookup one value and sum multiple coumns

    no worries. maybe something like this then:
    =COUNTIF(OFFSET(Sheet2!$G$7,0,MATCH(A2,Sheet2!$H$6:$S$6,0),COUNTA(Sheet2!$G:$G)),"y")

    or if you don't want the "0"s:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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