Home > Enterprise >  Google Sheets: How can I SUM total from drop down menu
Google Sheets: How can I SUM total from drop down menu

Time:08-14

I am making a sheet for meal planning and tracking calories.

I have made a separate sheet with the recipe names and their calories. In the main meal prep section I have 4 drop downs per day where I can pick the recipe names. I want to take those names, reference the calories and put the sum total at the bottom for each day. I do think SUMIF is the right direction but I can't seem to get it to work.

enter image description here

or:

=INDEX(QUERY(IFNA(VLOOKUP(B2:H5, Meals!A:B, 2, 0), 0), 
 "select sum(Col1),sum(Col2),sum(Col3),sum(Col4),sum(Col5),sum(Col6),sum(Col7)"), 2)

enter image description here

=INDEX(QUERY(IFNA(VLOOKUP(B2:H5, Meals!A:B, 2, ), 0), 
 "select "&TEXTJOIN(",", 1, "sum(Col"&SEQUENCE(COLUMNS(B2:H5))&")", )), 2)

enter image description here

  • Related