+ Reply to Thread
Results 1 to 30 of 30

Sum based on horizontal and vertical match

  1. #1
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Sum based on horizontal and vertical match

    I need a help in the attached excel file

    I need a lookup formula that can search the brand with the salesman name, to get the quantity sold.

    Then it sum all the sold quantities, and put it in another table

    Example: Brand A sold by salesman (Asif), then the excel should take 45 + 60, and add them in the other table
    Attached Files Attached Files
    Last edited by zeez36; 04-02-2013 at 02:30 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,603

    Re: Lookup formula

    Try the SUMIF function

  3. #3
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Lookup formula

    It doesn't work with me.

    So can you explain it to ho to do it.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,603

    Re: Lookup formula

    What does not work? Which error do you get? What have you tried?

    SUMIF function is explained in XL help - Hundreds of examples on the forum

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Lookup formula

    Also pls, take a few minutes to read forum rules, because:

    Your post does not comply with Rule 1 of our Forum RULES
    . Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  6. #6
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Lookup formula

    I am sorry for choosing a wrong title

    My problem is I have 2 condition, first I have to search for the salesman name and then search for a specific brand, and the summation will be added in a different cell
    When I tried to use SUMIF, it gives me the result for only one condition (Brand)

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    Thanks for title changing.

    I don't know what Pepe has in his mind, but i am not able to see in which way we'll be able to match the conditions in way that you have the layout of your data.

    The layout of your data is very strange.. Can you tell us how you use the SUMIF that gives you the correct result only for Brand? Then SUMIFS function maybe do the job..

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,603

    Re: Sum based on horizontal and vertical match

    I don't know what Pepe has in his mind
    Not much Fotis, it's the first working day after the weekend

    I hadn't sen there were two conditions involved so, as you say, SUMIFS is the way to go

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    Correct my friend. I forgot that last Sunday was Easter for you.

  10. #10
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    I would like to thank you for helping me to solve my problem

    I attached to you what I made, the equation gives me a wrong result,
    So may you please check it, and give me the right equation
    Attached Files Attached Files

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    You are welcome.

    As i said your data layout(as my opinion) are strange and it's difficult(maybe impossible) to get the expected result.

    I change a little tour layout and this formula gives you the expected results.

    =SUMPRODUCT(($B$4:$B$30=$K4)*($E$4:$E$30=M$3)*($C$4:$C$30))
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    I would like to thank you very much for your help, I really appreciated

    But we can't get the result unless we insert a column with the salesman name, isn't it!

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    Yes it is. I use a helper and hidden column with salemen names.

  14. #14
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    I have another file that I want to find a formula to fill the empty cells from down to up

    Shall I upload the file, so you can check it, or I have to open a new thread

  15. #15
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    You need to start a new thread.

  16. #16
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    Thanks a lot

  17. #17
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    ...........................

  18. #18
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    Please I was trying to make the same equation in different file but the result is #value

    I don't know the reson

  19. #19
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    Did you use a helper column as i show to you?

  20. #20
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    Yes, I made the same as you made

    I uploaded the file that you can check my mistake
    Attached Files Attached Files

  21. #21
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    My friend, did you check the file?

  22. #22
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    1) In H4 you have this formula.

    =SUMPRODUCT(($B$85:$B$95=G$83)*($E$85:$E$95=H$82&"")*($C$85:$C$95))

    But G83 & H85 are empties....

    2) SUMPRODUCT, does not like to calulate in a column MIXED nambers and text... So in column C, you must heve only numbers. Not words like "Names" or "Salesman" or ANYTHING. So delete these..

  23. #23
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    First of all, I would like to thank you for your help

    second, I made like you told me, but the result now is equal to zero

    1. Formula, =SUMPRODUCT(($B$2:$B$274=$K2)*($E$2:$E$274=H$3)*($C$2:$C$274))

    2. I delete the salesman and name from column C

    3. I changed column C format to Number

    3. Result is 0

    Is there is anything else should I do?
    Last edited by zeez36; 04-04-2013 at 03:20 AM.

  24. #24
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    Unfortunately i am not able to see the last 2 posts, because of the forum problems.. I already mentioned this and wait to fix it...!

  25. #25
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    Replying to you in my last post the system "drives" me in the second page and i see the replies. Still not able to go in the second page clicking gust page 2 OR last page..

    Any way see this one.

    In H4 and copy down and across.

    =SUMPRODUCT(($B$2:$B$95=$G4)*($E$2:$E$95=H$3)*($C$2:$C$95))
    Attached Files Attached Files

  26. #26
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    I tried to copy the formula in H4, as you told me, but the result still equal 0

  27. #27
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    Didn't you see my attachment?
    Last edited by Fotis1991; 04-04-2013 at 04:56 AM.

  28. #28
    Forum Contributor
    Join Date
    03-27-2013
    Location
    Dubai
    MS-Off Ver
    MS365 Version 2301
    Posts
    118

    Re: Sum based on horizontal and vertical match

    yes, I checked it, it's working

    But I don't know, when I tried to copy the formula and paste it into my file, it does't work (the result is 0)

  29. #29
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    You need to study carefully the formula and modify it according your needs in your real worksheet.

    I want to help you more but i don't see how can i do this any more..

    Good luck.
    Last edited by Fotis1991; 04-04-2013 at 05:09 AM.

  30. #30
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sum based on horizontal and vertical match

    You need to study the formula to understand how this works.

    Probably to need some (range?) modifications in your real file.

    As you mentioned, i try to help but anymore i can not understand how can i do this.

    Good luck.

+ 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