Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jrr6415sun
 
Posts: n/a
Default Help with adding certain cells using an IF function


Is there a way in excel to go through each row and add a certain cell if
it meets a certain condition in an adjacent cell?

for example

Item Quantity Price

Pin 5 20
Tag 8 40
Pin 3 15
Tag 2 10
Tag 1 7

I want to add up all the prices if the item is a pin


--
Jrr6415sun
------------------------------------------------------------------------
Jrr6415sun's Profile: http://www.excelforum.com/member.php...o&userid=25064
View this thread: http://www.excelforum.com/showthread...hreadid=385838

  #2   Report Post  
RagDyeR
 
Posts: n/a
Default

Try this:

=SUMIF(A:A,"Pin",C:C)

OR

Enter the item to lookup in another cell (D1), for easy revision:

=SUMIF(A:A,D1,C:C)

--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Jrr6415sun" wrote
in message ...

Is there a way in excel to go through each row and add a certain cell if
it meets a certain condition in an adjacent cell?

for example

Item Quantity Price

Pin 5 20
Tag 8 40
Pin 3 15
Tag 2 10
Tag 1 7

I want to add up all the prices if the item is a pin


--
Jrr6415sun
------------------------------------------------------------------------
Jrr6415sun's Profile:
http://www.excelforum.com/member.php...o&userid=25064
View this thread: http://www.excelforum.com/showthread...hreadid=385838


  #3   Report Post  
Jrr6415sun
 
Posts: n/a
Default


thank you very much

what if i want 2 criteria like in one column it has to be a pin and in
the other column it has to be the right date. Is there a way to do
this?


--
Jrr6415sun
------------------------------------------------------------------------
Jrr6415sun's Profile: http://www.excelforum.com/member.php...o&userid=25064
View this thread: http://www.excelforum.com/showthread...hreadid=385838

  #4   Report Post  
RagDyer
 
Posts: n/a
Default

Enter the item in D1, and the date to match in D2, with the date containing
column as B:

=SUMPRODUCT((A1:A100=D1)*(B1:B100=D2)*C1:C100)

With this formula, you can't use total column references (A:A, B:B ...etc.).

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Jrr6415sun" wrote
in message ...

thank you very much

what if i want 2 criteria like in one column it has to be a pin and in
the other column it has to be the right date. Is there a way to do
this?


--
Jrr6415sun
------------------------------------------------------------------------
Jrr6415sun's Profile:

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


  #5   Report Post  
Padgett
 
Posts: n/a
Default


The formulas given do work but you have a second option...

Choose...Tools, Addins and turn on your conditional sum wizard...Then
from the Tools menu choose 'conditional sum' and add whatever
conditions you want to the grid as shown in the graphic i
uploaded...last steps just ask you where you want your answer/s to
land...choose however many cells you need to catch the final result.
Luck to you
NMP


+-------------------------------------------------------------------+
|Filename: CSumWizard Example.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=3586 |
+-------------------------------------------------------------------+

--
Padgett

Master Certified Office Applications Instructor
------------------------------------------------------------------------
Padgett's Profile: http://www.excelforum.com/member.php...fo&userid=5670
View this thread: http://www.excelforum.com/showthread...hreadid=385838

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
Adding contents of cells by clicking in Excel 2002 Kevin Gordon Excel Discussion (Misc queries) 7 January 11th 05 04:49 PM
Adding formatted cells to an outline ? Glenn Excel Discussion (Misc queries) 4 January 11th 05 04:10 PM
Adding muliple cells. Jim Gentile Excel Worksheet Functions 3 December 8th 04 07:25 AM
Adding muliple cells. Jim Gentile Excel Worksheet Functions 1 December 7th 04 05:18 AM
ADDING CELLS WHICH ARE <> THAN OTHER CELLS boogie Excel Worksheet Functions 2 November 25th 04 02:41 PM


All times are GMT +1. The time now is 12:59 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"