constant array in sumproduct

reggieneo

New Member
Joined
Jun 27, 2017
Messages
26
Dear All, how can I use a constant array to make this formula work? basically I need a count of the food that "aida" have between jan1 to jan 4. summing them is working but I have to do one formula for each food, hence my formula gets really long. appreciate the help. thanks. =SUMPRODUCT((F6:O6=B1)*(B8:B24=A1)*(F8:O24="egg","milk,"banana","cookies")) [TABLE="width: 500"]
<tbody>[TR]
[TD]aida [/TD]
[TD]jan 1, 20[/TD]
[TD]jan 4, 2 [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]jan 1, 2018[/TD]
[TD]jan 2, 2018[/TD]
[TD]jan 3, 2018[/TD]
[TD]jan 4, 2018[/TD]
[/TR]
[TR]
[TD]aida[/TD]
[TD]egg[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]almire[/TD]
[TD][/TD]
[TD]milk[/TD]
[TD]banana[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]scott[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]cookies[/TD]
[/TR]
[TR]
[TD]jenn[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Your formula is wrong, there's a missing quote, and you can't do the egg milk banana cookies search like that.

Please supply some properly formatted data.
Use this

You cant attach files on this forum. There are tools on this forum for adding small spreadsheet images

https://www.mrexcel.com/forum/about-board/508133-attachments.html

Or upload the file to an online storage site and post a link to it, though some people may not download the file for fear of viruses.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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