View Single Post
  #9   Report Post  
Domenic
 
Posts: n/a
Default


Try.

=SUMPRODUCT(--(ISNUMBER(MATCH(B1:B5,{"Breakfast","Lunch","Dinner "},0))),C1:C5)

OR

=SUMPRODUCT(--(ISNUMBER(MATCH(B1:B5,E1:E3,0))),C1:C5)

...wherre E1:E3 contains Breakfast, Lunch, and Dinner.

Hope this helps!

Lewis Koh Wrote:
Hmm...now I wanted to catogorized breakfast,lunch and dinner as food. I
tried B6=SUMIF(B1:B5,OR("breakfast","Lunch","Dinner"),C1 :C5). The logic
seems to be allowable but it couldn't add up to the correct amount. It
always shows "0". May I know if I have typed something wrong?



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=391279