Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Lewis Koh
 
Posts: n/a
Default Need help in calculation at specific location


A B C
1 breakfast $13.50
2 water $1.10
3 food $80.00
4 others $13.90
5 food $4

Is it possible to type an equation whereby it will scan A1:C5 and if
the word "food" is found it will add the number next to it? I can't
seems to use IF(logic_test, true value,false value) for this... pls
help


--
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

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=sumif(A:A,"food",B:B)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lewis Koh" wrote
in message ...

A B C
1 breakfast $13.50
2 water $1.10
3 food $80.00
4 others $13.90
5 food $4

Is it possible to type an equation whereby it will scan A1:C5 and if
the word "food" is found it will add the number next to it? I can't
seems to use IF(logic_test, true value,false value) for this... pls
help


--
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



  #3   Report Post  
FSt1
 
Posts: n/a
Default

hi,
=sumif(B1:B5,"Food",C1:C5)
regards
FSt1

"Lewis Koh" wrote:


A B C
1 breakfast $13.50
2 water $1.10
3 food $80.00
4 others $13.90
5 food $4

Is it possible to type an equation whereby it will scan A1:C5 and if
the word "food" is found it will add the number next to it? I can't
seems to use IF(logic_test, true value,false value) for this... pls
help


--
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


  #4   Report Post  
Lewis Koh
 
Posts: n/a
Default


Thanks guys!!!! It works!!! BTW, how did you guys learn to use these
syntax? I can't seems to find the syntax to use from the Excel
Help...Don't even know where to start..


--
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

  #5   Report Post  
Lewis Koh
 
Posts: n/a
Default


Lewis Koh Wrote:

A B C D E
1 breakfast $13.50 food $5
2 water $1.10 Shirt $10
3 food $80.00
4 others $13.90
5 food $4

Is it possible to type an equation whereby it will scan A1:C5 and if
the word "food" is found it will add the number next to it? I can't
seems to use IF(logic_test, true value,false value) for this... pls
help


Hmm...=sumif(B1:B5,"Food",C1:C5) can't work if food appears on another
column. Is there a way to work around this?


--
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



  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

You have to add a separate summation for that column.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lewis Koh" wrote
in message ...

Lewis Koh Wrote:

A B C D E
1 breakfast $13.50 food $5
2 water $1.10 Shirt $10
3 food $80.00
4 others $13.90
5 food $4

Is it possible to type an equation whereby it will scan A1:C5 and if
the word "food" is found it will add the number next to it? I can't
seems to use IF(logic_test, true value,false value) for this... pls
help


Hmm...=sumif(B1:B5,"Food",C1:C5) can't work if food appears on another
column. Is there a way to work around this?


--
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



  #7   Report Post  
Lewis Koh
 
Posts: n/a
Default


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

  #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



  #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

  #10   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUM(SUMIF(B1:B5,{"Breakfast","Lunch","Dinner"},C1 :C5))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"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





  #11   Report Post  
Lewis Koh
 
Posts: n/a
Default


Thanks guys!!! It works!! :)


--
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stock Location Sorting Problem mark1caroline Excel Discussion (Misc queries) 3 July 13th 05 03:53 PM
How do I color specific data series based on location on data she Havard Charts and Charting in Excel 1 July 1st 05 02:06 PM
how do I draw a line in a chart at a specific location Charles Charts and Charting in Excel 1 February 8th 05 12:49 AM
hyperlink an excel cell to a specific location wthin application f dirtboy New Users to Excel 1 January 17th 05 08:07 PM
hyperlink an excel cell to a specific location wthin application f dirtboy Excel Discussion (Misc queries) 0 January 17th 05 08:03 PM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"