• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sumproduct with variable

desert rat

New Member
Hi All

I am having problems coming up with the right fomula for counting a column with text only if it matches a certain name in another column. My current formula is =SUMPRODUCT(($B$1:$B$37)*($A$1:$A$37="Robin")) and I have attached a test sheet fo an example.

Any ideas/help would be great.

Thanks
 

Attachments

  • test.xlsx
    11.1 KB · Views: 5
Is this what you looking for..
Thanks for that Nebu its exactly what I am after!

I'm not all that familar with pivot tales - do you know of a good link/resource that might be able to step me through the process of setting this up?
 
Hi @jeffreyweir

Ignore my incompetency in PT, when I stored the sample file with formula result in place of PT file took 30% less space on disk. May be we can give a releif on calculation with PT but PT will definitely going to take more space when data will grow.

Correct me if I am wrong, and enlighten us with the space taken up with PT.

Regards,
 
Somendra: This is from http://chandoo.org/wp/2013/09/29/i-said-your-spreadsheet-is-really-fat-not-real-phat/


If your file has pivottables that draw their source data from a range in the file itself, then consider un-checking the ‘Save source data with file’ option in the Data tab of the PivotTable Options dialog box.

  • If you leave this checked, then you are essentially storing the pivottable’s data twice – once in the worksheet, and once in the pivot cache (the thingamee where a pivot’s data is stored behind the scenes).
  • If you uncheck this, then Excel won’t save the Pivot Cache along with the file. Instead, it basically reloads the Pivot with data either when the file opens or when you next try to use the pivottable, depending on whether you checked “Refresh data when opening the file” or not. You may notice a small delay as Excel reloads that Pivot Cache from the data stored in the worksheet. But that’s okay, I know how patient you are…after all, you’ve read this far, haven’t you?
Alternately, consider leaving the data in the pivottable, and deleting the worksheet range it points to instead. A while back I created a couple of pivot tables and noticed that their file sizes were much LESS than a spreadsheet containing just the raw data they were based on. For instance, I filled three entire columns (which added up to 3.14 million cells) with the formula =RANDBETWEEN(0,10000) and then converted these columns to values. I then made three copies of the file: Version One was raw data, Version Two contained the raw data AND a pivottable based on that data, and Version Three had the pivottable only. Here’s the resulting file sizes:

  • Raw data only: 26.4 MB
  • Raw data AND a pivottable that uses the data: 39.1 MB
  • Pivot table only: 12.6 MB
Wow! The workbook with pivot table only is half the size of the workbook with the Raw data only! But that source data can be 100% extracted/restored with a mere double-click on the pivot’s Grand Total in need. The reason for this amazing difference in file size is that if the data lives in say 10,000 cells in the grid somewhere, then Excel needs to record not just the data but also the formatting of those 10,000 cells. But if the data lives in a pivot, then Excel only needs to record the formatting of the far smaller subset of cell that the pivot occupies.

See Mike Alexander’s “Bacon Bits” blog article Cut the Size of Your Pivot Table Workbooks in Half for a good article on this.

So yes, PivotTables can increase filesize. But they can also decrease filesize. Regardless, I think that usually the tradeoff is worth it. And I'm nowhere near running out of diskspace.
 
Back
Top