PC Review


Reply
Thread Tools Rate Thread

adding value only if criteria is true

 
 
gerryR
Guest
Posts: n/a
 
      7th Jul 2006
Hi all. I've 2 columns (see below)

1 20
3 35
2 10
5 20
4 25
2 30
1 30


I need to get the total for each number on the lefts corrosponding value on
the right.

ie. Total of 1=50
2=40
etc

I tried

=IF(D1521="1", SUM(F15:F21))

but no joy, can anyone shed some light?
thanks and regards
gR


 
Reply With Quote
 
 
 
 
Bondi
Guest
Posts: n/a
 
      7th Jul 2006

Hi gR,

If we say that your data is in column A and B then you can use SUMIF()
along the lines of :

=SUMIF(A1:A7,"=1",B1:B7)

Regards,
Bondi

 
Reply With Quote
 
daddylonglegs
Guest
Posts: n/a
 
      7th Jul 2006

Try SUMIF, i.e.

=SUMIF(D1521,1,F15:F21)

you only need to put quotes around the 1 if data in D1521 is text
rather than numeric


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=559256

 
Reply With Quote
 
gerryR
Guest
Posts: n/a
 
      7th Jul 2006
Perfect!

thaks for the very fast reply Bondi!
gR


"Bondi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Hi gR,
>
> If we say that your data is in column A and B then you can use SUMIF()
> along the lines of :
>
> =SUMIF(A1:A7,"=1",B1:B7)
>
> Regards,
> Bondi
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating if 1 for 2 criteria are true The Rook Microsoft Excel Misc 3 11th Mar 2009 05:14 PM
Stored Query - Criteria if box = true, => true, if box = false => BlueWolverine Microsoft Access Forms 1 4th Aug 2008 09:13 PM
Adding a MsgBox when criteria are true Gabriella777_2 Microsoft Access Forms 4 29th Apr 2008 07:50 PM
True, False, or Both criteria BruceM Microsoft Access Queries 4 12th Mar 2008 04:47 PM
Countif( 2 criteria = true ?) =?Utf-8?B?TXlLb29s?= Microsoft Excel Misc 3 17th Oct 2005 02:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:57 AM.