+ Reply to Thread
Results 1 to 11 of 11

Formula needed to split the results of a DSUM from another worksheet

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Maine, US
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    7

    Formula needed to split the results of a DSUM from another worksheet

    Hello ~

    Describing this may be complex:

    Main1 is the main worksheet which contains a ton of information other than what I'm showing you but I have simplified it here. Cells A5 through A9 and A20 through A24 on this worksheet is where I need help. The formula I am currently using is not pulling the information how I need it to be pulled.

    Report A is an example of how one of our reports look when we print to excel. I would like this to remain unmodified if possible to limit the work done by others. The "Amount" column doesn't matter here - and the numbers in my example don't make any sense - the focus should be on the % of Totals column.

    So the report prints out the codes - CAAA for example and CAAAZZ along with many others (could be hundreds). I need the formula on Main1 to correctly sum the amounts seperately for each type. So in this example AAAA in Column B of Main1 shows 15 percent. That is the total of all of the AAAA codes, but I need it to sum all the regular codes minus the ZZ for cells A5 through A9 and sum all the "ZZ" codes for cells A20 through A24. I need it to show cell A5 as "10" and cell A20 as 5, for example.

    Any help is appreciated! Thank you!

    sample1.xls
    Last edited by RandomNumber; 10-31-2012 at 10:45 AM.

  2. #2
    Registered User
    Join Date
    10-29-2012
    Location
    Maine, US
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    7

    Re: Formula needed to split the results of a DSUM from another worksheet

    Is there anything that anyone needs further explained?

    I do apologize for my terrible title I didn't know how to classify the issue.

    Thanks ~

  3. #3
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Formula needed to split the results of a DSUM from another worksheet

    Welcome to the forum.

    Would be helpful if you can upload a sample workbook.
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  4. #4
    Registered User
    Join Date
    10-29-2012
    Location
    Maine, US
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    7

    Re: Formula needed to split the results of a DSUM from another worksheet

    There is one attached to my OP. Let me know if anything else is needed.

  5. #5
    Registered User
    Join Date
    10-29-2012
    Location
    Maine, US
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    7

    Re: Formula needed to split the results of a DSUM from another worksheet

    Could a SUMIF function be used to solve my dilemma? I have been trying to work it out but so far I am unlucky.

  6. #6
    Registered User
    Join Date
    10-29-2012
    Location
    Maine, US
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    7

    Re: Formula needed to split the results of a DSUM from another worksheet

    I am attempting to use a SUMIF function instead of DSUM for this, but I cannot get it to work. This is what I have so far:

    Please Login or Register  to view this content.
    Am I nesting correctly or is this simply not allowed?

  7. #7
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Formula needed to split the results of a DSUM from another worksheet

    Not sure if this entirely addresses your points, but try this:

    In cell A5:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In cell A20:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The above gives 10 in cell A5 and 5 in cell A20, as you had mentioned in the original post.

    Hope this helps.

  8. #8
    Registered User
    Join Date
    10-29-2012
    Location
    Maine, US
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    7

    Re: Formula needed to split the results of a DSUM from another worksheet

    Thank you very much for your help kbkumar!, I think you are very close to what I need. I noticed one small issue when I applied it to my actual excel file.

    I have more Codes other than AAAA and AAAAZZ. There are also codes like AAAAXX and AAAAXY, etc. The formula you provided works great for getting AAAAZZ values, but the other formula only works for getting the values for AAAA. I need it work for any other AAAA code that is not AAAAZZ.

    In my example sheet I have codes like this with CAAA. With your formula, B7 gives 6.25 (it should be 7.95) and B22 gives 3.75 (which is correct). Is there a simple fix for this?

    Thank you so much for your assisstance, it is very much appreciated.

  9. #9
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Formula needed to split the results of a DSUM from another worksheet

    Replace A5 with below and drag the formula down till A10:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell A7 now has 7.95 against CAAA. Hope thats what you wanted.

  10. #10
    Registered User
    Join Date
    10-29-2012
    Location
    Maine, US
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    7

    Re: Formula needed to split the results of a DSUM from another worksheet

    kbkumar, Thanks again for your help, you made it look too easy.

  11. #11
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Formula needed to split the results of a DSUM from another worksheet

    No worries

+ 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