Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

keeping subtotals accurate to reflect sorting...

0 views
Skip to first unread message

Amanda Fekety

unread,
Nov 24, 2009, 4:31:39 PM11/24/09
to
Hi, not sure how to present my question briefly....

I've created an inventory sheet for our restaurants with the following
columns: category, description, vendor, item #, price, etc etc etc.

At the bottom of the 250 some odd line items I have everything
subtotaled by category (all beverages, dairy, spices, produce, etc)
and created those subtotals by typing "=sum(r4:r21,u4:21)" as
beverages are in rows 4-21 and inventory calculation results are found
in columns R and U. and I repleated this for all categories...

this is fine until people start sorting. when sorting by item number
for example, beverages are no longer rows 4-21, but maybe 4,
17,22-28,99,100-102 or whatever. but my totals at the bottom don't
reflect that and still say beverages "=sum(r4:r21,u4:21)"

how can I get my subtotals at the bottom to "stick with" the beverages
categories? I feel like the solution is right under my nose...

thanks in advance.

T. Valko

unread,
Nov 24, 2009, 9:25:42 PM11/24/09
to
Try using the SUMIF function.

..........A..........B
1.....Bev.........5
2.....Pro..........3
3.....Bev.........2
4.....Sp...........3
5.....Bev.........2

=SUMIF(A1:A5,"Bev",B1:B5)

--
Biff
Microsoft Excel MVP


"Amanda Fekety" <afe...@gmail.com> wrote in message
news:d198bca5-8250-41d5...@m11g2000vbo.googlegroups.com...

0 new messages