Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default SUMIF/COUNTIF problems

I would like to sum all occurences of a value in Column A, if another value
occurs in column B in the same row... but I cant figure out how to do it.
Essentially I want to calculate 'How many times does Column A = 1 when Column
B = Yes'? Any help would be most appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default SUMIF/COUNTIF problems

Use SUMPRODUCT if you have more than one condition to check.

=SUMPRODUCT(--(A1:A100=1),--(B1:B100="Yes"))

HTH,
Elkar


"tonefbr" wrote:

I would like to sum all occurences of a value in Column A, if another value
occurs in column B in the same row... but I cant figure out how to do it.
Essentially I want to calculate 'How many times does Column A = 1 when Column
B = Yes'? Any help would be most appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default SUMIF/COUNTIF problems

Many thanks for the quick reply. I have tried this, but I'm still getting
errors. The two columns are in another worksheet - would this make a
difference?

I assume that the '--' in the formula are dashes

"Elkar" wrote:

Use SUMPRODUCT if you have more than one condition to check.

=SUMPRODUCT(--(A1:A100=1),--(B1:B100="Yes"))

HTH,
Elkar


"tonefbr" wrote:

I would like to sum all occurences of a value in Column A, if another value
occurs in column B in the same row... but I cant figure out how to do it.
Essentially I want to calculate 'How many times does Column A = 1 when Column
B = Yes'? Any help would be most appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default SUMIF/COUNTIF problems

Yes, you have to tell Excel where the data is, as in
=SUMPRODUCT(--(SheetName!A1:A100=1),--(SheetName!B1:B100="Yes")). If you
don't specify on which sheet the data is, Excel assumes the data is on the
sheet where the formula is.

"tonefbr" wrote in message
...
Many thanks for the quick reply. I have tried this, but I'm still getting
errors. The two columns are in another worksheet - would this make a
difference?

I assume that the '--' in the formula are dashes

"Elkar" wrote:

Use SUMPRODUCT if you have more than one condition to check.

=SUMPRODUCT(--(A1:A100=1),--(B1:B100="Yes"))

HTH,
Elkar


"tonefbr" wrote:

I would like to sum all occurences of a value in Column A, if another
value
occurs in column B in the same row... but I cant figure out how to do
it.
Essentially I want to calculate 'How many times does Column A = 1 when
Column
B = Yes'? Any help would be most appreciated.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default SUMIF/COUNTIF problems

Tyro,

Many thanks - I've found my error - I was using A:A instead of A1:A100 (I
wanted to check all rows in the columns)

I've simply set the row to 200 to ensure that it counts all rows

Thanks again

Tone

"Tyro" wrote:

Yes, you have to tell Excel where the data is, as in
=SUMPRODUCT(--(SheetName!A1:A100=1),--(SheetName!B1:B100="Yes")). If you
don't specify on which sheet the data is, Excel assumes the data is on the
sheet where the formula is.

"tonefbr" wrote in message
...
Many thanks for the quick reply. I have tried this, but I'm still getting
errors. The two columns are in another worksheet - would this make a
difference?

I assume that the '--' in the formula are dashes

"Elkar" wrote:

Use SUMPRODUCT if you have more than one condition to check.

=SUMPRODUCT(--(A1:A100=1),--(B1:B100="Yes"))

HTH,
Elkar


"tonefbr" wrote:

I would like to sum all occurences of a value in Column A, if another
value
occurs in column B in the same row... but I cant figure out how to do
it.
Essentially I want to calculate 'How many times does Column A = 1 when
Column
B = Yes'? Any help would be most appreciated.




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
sumif problems Ricardo Excel Discussion (Misc queries) 2 January 6th 07 12:14 AM
SUMIF problems David Excel Worksheet Functions 3 October 11th 06 03:11 AM
Problems with SUMIF() Navision Excel Worksheet Functions 5 March 3rd 06 04:22 PM
problems with sumif and countif Simon Shaw Excel Discussion (Misc queries) 6 July 23rd 05 10:02 PM
Sumif Problems Anat Excel Discussion (Misc queries) 6 June 16th 05 06:05 AM


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