View Single Post
  #8   Report Post  
Max
 
Posts: n/a
Default

Try instead, array-entered (i.e. press CTRL+SHIFT+ENTER):

=SUM(IF(A1:A5={"Breakfast","Lunch","Dinner"},B1:B5 ))

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Lewis Koh" wrote
in message ...

Lewis Koh Wrote:

A B C
1 Breakfast $13.50
2 water $1.10
3 Lunch $80.00
4 others $13.90
5 Dinner $4



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?


--
Lewis Koh
------------------------------------------------------------------------
Lewis Koh's Profile:

http://www.excelforum.com/member.php...o&userid=25712
View this thread: http://www.excelforum.com/showthread...hreadid=391279