Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
aburnce
 
Posts: n/a
Default Summing quantities based on like criteria?


Not sure where to look for this.

I have a spreadsheet containing recipes and the ingredients used for
them. I want to sort by ingredients (peanuts might come up in 3
recipes, for instance, and each has a quantity listed in a
corresponding cell), then sum the total quantity of that ingredient
needed across all recipes that contain it. Not sure if this is done
with a formula, a pivot table, or something else. Any help would be
appreciated.

If this is not clear, my end result would be that I have an easy Excel
way to just list the quantities of all the ingredients needed for a
bunch of recipes, then go shop for the total quantity of each
ingredient that I need. I'm a backpacker trying to put together a meal
plan for a week-long trip.

See the attached sheet - I'm trying to work with the Ingredients and
Total Qty columns.

THANKS! :)


+-------------------------------------------------------------------+
|Filename: meal plan spreadsheet.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4605 |
+-------------------------------------------------------------------+

--
aburnce
------------------------------------------------------------------------
aburnce's Profile: http://www.excelforum.com/member.php...o&userid=33288
View this thread: http://www.excelforum.com/showthread...hreadid=531137

  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Summing quantities based on like criteria?

Hi!

First thing you need to do is to convert the TEXT numbers in column D to
NUMERIC numbers.

Select cell A1
Goto EditCopy
Select the range D4:D91
Goto EditPaste SpecialAddOK

Now, create a list of the unique ingredients.

Select the range C3:C91
Goto DataFilterAdvanced Filter
Select Copy to another location
Copy to: $M$3
Select Unique records only
OK

Now, get the total needed.

Enter this formula in N4:

=SUMIF(C$4:C$91,M4,D$4:D$91)

Copy down to N56.

Biff

"aburnce" wrote in
message ...

Not sure where to look for this.

I have a spreadsheet containing recipes and the ingredients used for
them. I want to sort by ingredients (peanuts might come up in 3
recipes, for instance, and each has a quantity listed in a
corresponding cell), then sum the total quantity of that ingredient
needed across all recipes that contain it. Not sure if this is done
with a formula, a pivot table, or something else. Any help would be
appreciated.

If this is not clear, my end result would be that I have an easy Excel
way to just list the quantities of all the ingredients needed for a
bunch of recipes, then go shop for the total quantity of each
ingredient that I need. I'm a backpacker trying to put together a meal
plan for a week-long trip.

See the attached sheet - I'm trying to work with the Ingredients and
Total Qty columns.

THANKS! :)


+-------------------------------------------------------------------+
|Filename: meal plan spreadsheet.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4605 |
+-------------------------------------------------------------------+

--
aburnce
------------------------------------------------------------------------
aburnce's Profile:
http://www.excelforum.com/member.php...o&userid=33288
View this thread: http://www.excelforum.com/showthread...hreadid=531137



  #3   Report Post  
Posted to microsoft.public.excel.misc
aburnce
 
Posts: n/a
Default Summing quantities based on like criteria?


Thank you! That's exactly what I needed.

For anyone who might care...I decided that it would be easier to
concatenate the Ingredients and Measure columns, then apply the filter
to that in making my shopping list. This allows my unique list to
include the same item listed in the various recipes with different
measures (i.e. 1 recipe calls for 3 tsp of cinnamon, one for 2 tbl).
Then when I do the SUMIF function, I have my measures visible and can
more easily identify which ingredients with unlike measures need to be
converted and added together.

Final version is attached. Thanks, Biff!


+-------------------------------------------------------------------+
|Filename: meal plan spreadsheet.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4606 |
+-------------------------------------------------------------------+

--
aburnce
------------------------------------------------------------------------
aburnce's Profile: http://www.excelforum.com/member.php...o&userid=33288
View this thread: http://www.excelforum.com/showthread...hreadid=531137

  #4   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Summing quantities based on like criteria?

You're welcome!

Biff

"aburnce" wrote in
message ...

Thank you! That's exactly what I needed.

For anyone who might care...I decided that it would be easier to
concatenate the Ingredients and Measure columns, then apply the filter
to that in making my shopping list. This allows my unique list to
include the same item listed in the various recipes with different
measures (i.e. 1 recipe calls for 3 tsp of cinnamon, one for 2 tbl).
Then when I do the SUMIF function, I have my measures visible and can
more easily identify which ingredients with unlike measures need to be
converted and added together.

Final version is attached. Thanks, Biff!


+-------------------------------------------------------------------+
|Filename: meal plan spreadsheet.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4606 |
+-------------------------------------------------------------------+

--
aburnce
------------------------------------------------------------------------
aburnce's Profile:
http://www.excelforum.com/member.php...o&userid=33288
View this thread: http://www.excelforum.com/showthread...hreadid=531137



  #5   Report Post  
Posted to microsoft.public.excel.misc
aburnce
 
Posts: n/a
Default Summing quantities based on like criteria?


I'd like to take this spreadsheet one step further and add the ability
to select which recipes I want to shop for. I would just build recipes
into the spreadsheet, then have an INCLUDE column with Y/N values
indicating whether to include a particular recipe for a given trip. I
would then somehow apply the Advanced Filter only to the items with Y
selected, and would SUMIF only the quantities where Y is selected. So
I guess there are two things here I need to know how to do:

1.) Apply the Advanced Filter based only on items in a list that meet a
criteria, rather than the whole list

2.) Create a SUMIF statement that uses TWO criteria: one for whether
the ingredient name matches, and one for whether Y is selected in the
INCLUDE column.

Thanks in advance for the help.

Alan


--
aburnce
------------------------------------------------------------------------
aburnce's Profile: http://www.excelforum.com/member.php...o&userid=33288
View this thread: http://www.excelforum.com/showthread...hreadid=531137



  #6   Report Post  
Posted to microsoft.public.excel.misc
aburnce
 
Posts: n/a
Default Summing quantities based on like criteria?


bumpity bump


--
aburnce
------------------------------------------------------------------------
aburnce's Profile: http://www.excelforum.com/member.php...o&userid=33288
View this thread: http://www.excelforum.com/showthread...hreadid=531137

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
return multiple rows of data based on criteria steve_sr2 Excel Worksheet Functions 8 May 20th 23 07:47 PM
Calculating an average based on 2 and 3 criteria craggergirl Excel Worksheet Functions 2 February 24th 06 02:37 PM
Returning Results Based on Two Criteria [email protected] Excel Worksheet Functions 7 October 23rd 05 02:53 PM
Counting & Summing based on criteria on another column Chicago D Excel Discussion (Misc queries) 2 August 25th 05 06:58 PM
counting cells (COUNTIF) based on two or more criteria Tricia S. Excel Worksheet Functions 10 March 17th 05 02:17 PM


All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"