Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I compute a sum based on two columns

I want to compute a sum based on whether or not two columns contain certain
values. In otherwords, count the number of rows with colA = "X" and colB =
"Y".
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default How do I compute a sum based on two columns

One way:

=SUMPRODUCT(--(A1:A1000="X"),--(B1:B1000="Y"))

will count. If you want to sum a third column:

=SUMPRODUCT(--(A1:A1000="X"),--(B1:B1000="Y"),C1:C1000)

For an explanation of "--" see

http://www.mcgimpsey.com/excel/doubleneg.htm





In article ,
"FISHbGood2" wrote:

I want to compute a sum based on whether or not two columns contain certain
values. In otherwords, count the number of rows with colA = "X" and colB =
"Y".

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default How do I compute a sum based on two columns

please be more explicit

"FISHbGood2" wrote:

I want to compute a sum based on whether or not two columns contain certain
values. In otherwords, count the number of rows with colA = "X" and colB =
"Y".

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
Formula to compute letter grade based on percentage grade S.Hinkle Excel Discussion (Misc queries) 1 September 3rd 09 07:54 PM
how to compute a range of cells based on another range of cells? HAROLD Excel Worksheet Functions 1 December 30th 05 09:32 PM
how to compute a range of cells based on another range of cells? HAROLD Excel Worksheet Functions 2 December 30th 05 07:55 PM
How can I compute a kids age based on his birthdate Coach T Excel Worksheet Functions 5 July 4th 05 04:01 PM
Tallying columns based on values of 2 different columns Mctabish Excel Worksheet Functions 1 January 30th 05 10:40 AM


All times are GMT +1. The time now is 07:23 PM.

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"