+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : summing data in a table if a vertical and horizontal requirement are met

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    summing data in a table if a vertical and horizontal requirement are met

    I have a large pivot table, and need to sum data from it when the row above the data table says "Pre" (there will be multiple of these), and the column to the left says "Sales - beer - craft" (this will only occur once). I can't use a conventional sumif because when the pivot table updates it moves the rows the data is on, and the rows being referred to by my formulas start to link to the wrong row.

    Does anybody know how to do this?.
    Last edited by NBVC; 10-20-2011 at 07:46 AM.

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

    Re: summing data in a table if a vertical and horizontal requirement are met

    You can use SUMIF I think.

    Say your table covers column C:H and variable rows. Where column C contains the left side row headers and the data actually starts in column D.... and also that you are entering the "Pre" in row 1 of D:H

    Try something like:

    =SUMIF($D$1:$H$1,"Pre",INDEX($D:$H,MATCH("Sales - beer - craft",$C:$C,0),0))

    so assuming as you said that "Sales - beer - craft" exists once in column C, then that row will be summed where "Pre" flags desired columns to sum.
    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.

  3. #3
    Registered User
    Join Date
    10-19-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: summing data in a table if a vertical and horizontal requirement are met

    Thanks NBVC! You have just saved me countless hours!!! That formula does exactly what I want it to do.

    I now love you on par with my wife (recently married, so that is still a good thing), and if it were not for my wifes aversion to large statues in our garden, I would erect a large statue in your honour just behind the rose bush in view of the living room window.

+ 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