+ Reply to Thread
Results 1 to 7 of 7

count & sum ranges from Pivot

  1. #1
    Registered User
    Join Date
    11-20-2008
    Location
    England
    MS-Off Ver
    2007
    Posts
    65

    count & sum ranges from Pivot

    Hi All,

    I have a pivot table (sheet1)that has dates along the top(jan to dec 08 and will eventually include 2009) and codes down the left side.

    The pivot will change on a daily basis, i.e. more codes will be added, as the new date comes up.

    On sheet2 is my basis formula's that count or sum up on a monthly basis but with a fixed range, so if the pivot chnages the formala does not!!

    Can someone help me with a formala that is dynamic enough to cope with this, i.e. maybe using the month to help with the calculation?

    Please see my example spreadsheet to see what i mean.

    Thanks
    Attached Files Attached Files
    Last edited by luke_p; 03-23-2009 at 08:31 AM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: count & sum ranges from Pivot

    Hi,
    maybe it would be better to post an XLS file instead of xlsx
    Not everyone has 2007 yet

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count & sum ranges from Pivot

    Try these:

    in B9:

    Please Login or Register  to view this content.
    in C9:

    Please Login or Register  to view this content.
    in D9:

    Please Login or Register  to view this content.
    in E9:

    Please Login or Register  to view this content.
    each copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    11-20-2008
    Location
    England
    MS-Off Ver
    2007
    Posts
    65

    Re: count & sum ranges from Pivot

    Thanks NBVC,

    your formala works for the 30,60 & 75 but not for ">75" as this can be any multiple of the above 3 e.g. 90, 105, 120 etc.. etc...

    Also, you still have to specify a range for dates.

    is ther eno way of tellijg the formula to see if the month is in the column and pick up the data for that month ?

    (also spreadsheet as 2003)
    Attached Files Attached Files

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count & sum ranges from Pivot

    Ok.

    See attached... Now it is both vertically and horizontally dynamic.

    first.. better to change your dates in row 7 of Sheet1 to actual dates and not text strings and then format to desired appearance... I did that in the attached for you...

    Now use Sumproduct formulas in columns B and D of sheet2 and simply multiplication formulas in C and E.

    I used column A to reference number to search for but you can hard code into formula.. you just won't be able to copy down and get a self adjusting formula.. you will have to hard code the number into each.

    To take care of the >75, I simply said >A11 which contains the same 75...

    Hope this helps.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-20-2008
    Location
    England
    MS-Off Ver
    2007
    Posts
    65

    Re: count & sum ranges from Pivot

    NBVC, many many thanks.

    one last question with regards the formula, more so i understand whats going on;

    in the formula you have

    Please Login or Register  to view this content.
    what does this match to (what does it mean) ?

    Sorry thinking about it, if you have the time, can you give me a step by step as to what the formula is doing ?
    Last edited by luke_p; 03-23-2009 at 05:02 AM.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: count & sum ranges from Pivot

    Match(9.999999e+307,A:A) looks for the position of the last numeric entry in column A...

    9.9999999e+307 (maybe a couple more 9's) is the largest number that Excel recognizes and the Match() function without the optional 3rd argument looks through the range and finds the last entry that is smaller than or equal to the number being looked up (i.e. 9.99999999e+307)

+ 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