Issue with text in my dsum and match function

homebrewhero

New Member
Joined
Mar 18, 2016
Messages
15
Good afternoon everyone! I am having trouble achieving the results I would like to on my spreadsheet. I would like to add the amount of “Eggs, Liquid (Case)” together from Sheet 2 and have the total on Sheet 1 under the column “Total Need” (which should come out to be 0.50). I have fiddled with different variations of sum and index match as well as changing the formats of cells for a while and can’t seem to get past this.

The following is the formula I have for C2 in Sheet 1 where the error ‘#VALUE!’ currently is (stating that ‘the cell currently being evaluated contains a constant’ underlining what is highlighted below).

=DSUM('Breakfast - Light'!A2:B30, MATCH(B2, 'Breakfast - Light'!A2:A30, 1), B2)

Sheet 1: ‘BQT Item Summary’

PurveyorProductTotal Need Breakfast Light
Eggs, Liquid (Case)#VALUE! 0.50

<tbody>
</tbody>

Sheet2: ‘Breakfast – Light’
ProductNeed
Orange Juice (Case)0.31
Cranberry Juice (Case)0.16
Assorted Mini Pastries (Case)0.17
Butter Balls (Case)0.03
Coffee Regular (Case)0.06
Coffee Decaf (Case)0.05
Assorted Tea Forte Pouches
Bagels (Dozen)
Cream Cheese Packets (Case)
Assorted Muffin Mix (Case)
Breakfast Tacos
Eggs, Liquid (Case)0.17
Tortillas (Packet)2.19
Cheese Shred (Case)0.33
Proteins (Case)0.33
Ham Egg and Cheese Croissants
Croissants (Case)0.83
Eggs, Liquid (Case)0.17
Ham (Case)0.21
Cheese, American (Packet)0.25
Sausage Egg and Cheese Biscuits
Sausage Pattie (Case)0.25
Eggs, Liquid (Case)0.17
Cheese, American (Packet)0.25
Biscuits (Case)0.17

<tbody>
</tbody>
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
My apologies, the error when I do 'Show Calculation Steps' is Italics and Underlined.

=DSUM('Breakfast - Light'!A2:B30, MATCH(B2, 'Breakfast - Light'!A2:A30, 1), B2
 
Upvote 0
Care to explain what this DSUM formula is supposed to achieve?

By the way, a SUMIFS formula yields 0.51 for Eggs, Liquid (Case), the criterion value in B2.
 
Upvote 0
Care to explain what this DSUM formula is supposed to achieve?

By the way, a SUMIFS formula yields 0.51 for Eggs, Liquid (Case), the criterion value in B2.

Thank you for your response Aladin. I toyed with sumifs and was given the value of 0 and that was as far as I got with that function (would very much like to know how you got that answer), then I found dsum and that was the last formula I toyed with before posting. I would like for the function (whichever and however works at this point) to add up all of the 'Need' numbers for specified items, in this case Eggs, Liquid (Case) on row 2, the next item whatever I may have it be on row 3.

The way Sheet 2 is currently set up is that there is another column E that has 'yes' and 'no' drop down boxes on it for Breakfast Tacos and Breakfast Sandwiches. if 'yes' is selected, then there is a formula in the cells of column B to figure out how much of each item is needed for Breakfast Tacos and Breakfast Sandwiches for a certain number of people eating (there is a formula in every cell of column B that has a food item on it that row); if column E is 'no', column B stays blank.
 
Upvote 0
They vary depending on the item, but they are simple maths such as the following

Eggs, Liquid (Case) =f6/150

Where f6 is the cell that holds the user input value of how many people for the Breakfast - Light menu.
The following would be a couple of items for Breakfast Tacos, which has the options with 'yes' or 'no' in column E (underlined rows)

Eggs, Liquid (Case) =IF(E14 = "yes", F6/150,"")
Tortillas (Packet) =IF(E14 = "yes", F6/20*1.75,"")
 
Upvote 0
They vary depending on the item, but they are simple maths such as the following

Eggs, Liquid (Case) =f6/150

Where f6 is the cell that holds the user input value of how many people for the Breakfast - Light menu.
The following would be a couple of items for Breakfast Tacos, which has the options with 'yes' or 'no' in column E (underlined rows)

Eggs, Liquid (Case) =IF(E14 = "yes", F6/150,"")
Tortillas (Packet) =IF(E14 = "yes", F6/20*1.75,"")

Since this creates either a blank or a true number, the SUMIFS formula should work also in your workbook: https://dl.dropboxusercontent.com/u/65698317/homebrewhero SUMIFS.xlsx.
 
Upvote 0
Since this creates either a blank or a true number, the SUMIFS formula should work also in your workbook: https://dl.dropboxusercontent.com/u/65698317/homebrewhero SUMIFS.xlsx.

Thank you for the formula, it works like a charm, Thank you for all of your help.

One more question, how would I rewrite the formula to work across multiple spreadsheets? Is it just a matter of adding new criteria for each spreadsheet in the formula? Is there a limited number of criteria (or any limit at all) I may sum up in this function? I have about 40 spreadsheets in my workbook.
 
Upvote 0
Thank you for the formula, it works like a charm, Thank you for all of your help.

For the record, the formula is:

=SUMIFS('Breakfast – Light'!B:B,'Breakfast – Light'!A:A,B2)

One more question, how would I rewrite the formula to work across multiple spreadsheets? Is it just a matter of adding new criteria for each spreadsheet in the formula? Is there a limited number of criteria (or any limit at all) I may sum up in this function? I have about 40 spreadsheets in my workbook.

If I'm reading your intent correctly:

=SUMPRODUCT(SUMIFS(INDIRECT("'"&SheetList&"'!B:B"),INDIRECT("'"&SheetList&"'!A:A"),B2))

would create a total across multiple sheets which are listed in SheetList for the criterion B2 houses.

SheetList is thus the name of the range which houses the relevant sheet names like Breakfast – Light.
 
Upvote 0
For the record, the formula is:

=SUMIFS('Breakfast – Light'!B:B,'Breakfast – Light'!A:A,B2)


If I'm reading your intent correctly:

=SUMPRODUCT(SUMIFS(INDIRECT("'"&SheetList&"'!B:B"),INDIRECT("'"&SheetList&"'!A:A"),B2))

would create a total across multiple sheets which are listed in SheetList for the criterion B2 houses.

SheetList is thus the name of the range which houses the relevant sheet names like Breakfast – Light.

Yes, SUMIFS is the function I used, I found it on the spreadsheet you attached.

I want to make sure I understand this correctly, the SUMPRODUCT you used would look something like the following as an example and gather up information regarding to criterion B2 of 'BQT Items Summary' from all of the sheets in-between the two sheets in the formula

given sheets {BQT Items Summary, Breakfast - Light, Breakfast - Traditional, Breakfast - SXSW, Breakfast - Healthy}

<Cell C2 BQT Items Summary>
=SUMPRODUCT(SUMIFS(INDIRECT("'"&Breakfast - Light&"'!B:B"),INDIRECT("'"&Breakfast - Healthy&"'!A:A"),B2))
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top