Could I do something with cell names? I haven't been able to get it to keep the cell names when I generate the spreadsheet... Is there a trick or is it not doable?
Jim -----Original Message----- From: Michael Zalewski [mailto:zalew...@optonline.net] Sent: Tuesday, August 31, 2010 3:13 PM To: user@poi.apache.org Subject: Re: Help with SUM function Sounds like you are having a column with Subtotals and Grand Totals. The SUM function that yields your grand total does not need to pick out ranges. Just run the SUM function over the entire column For example A B 1 Supplier #1 1.00 2 2.00 3 Subtotal @SUM(B1:B2) 4 Supplier #2 3.00 5 4.00 6 Subtotal @SUM(B4:B5) 7 GRAND TOTAL @SUM(B1:B5) You would think that the GRAND TOTAL would be double the correct result, because it looks like the formula includes the subtotals at B3 and B6. But such is not the case. The SUM function will ignore cells which contain subtotals from cells already included in the SUM. I'm not sure that the POI Formula Evaluator behaves this way. But Excel does. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org