Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Agallagher
 
Posts: n/a
Default sum if conditions in two columns are met?

I need to find the total if conditions in two columns are met. I'm doing a
school lottery for enrollment and need to see how many students met the
criteria "yes" in a specific grade level "1".

Example:

Column A Column B
Yes 1
3
Yes 1
1

I'm looking for the total number of times yes and 1 are in the same row.
Here it is 2 times.

Thanks for any help anyone can give me.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default sum if conditions in two columns are met?

Hi!

Try this:

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

Biff

"Agallagher" wrote in message
...
I need to find the total if conditions in two columns are met. I'm doing a
school lottery for enrollment and need to see how many students met the
criteria "yes" in a specific grade level "1".

Example:

Column A Column B
Yes 1
3
Yes 1
1

I'm looking for the total number of times yes and 1 are in the same row.
Here it is 2 times.

Thanks for any help anyone can give me.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Agallagher
 
Posts: n/a
Default sum if conditions in two columns are met?

Biff,

Thanks. This worked however now I would like to place the totals on a
separate tab in the same worksheet. What additional information do I need to
add to this string. Below is what I tried but I received a #VALUE! error.

=SUMPRODUCT(--('Current Students'!K2:K1000="YES"),--('Current
Students'!N2:N1000=1))

"Biff" wrote:

Hi!

Try this:

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

Biff

"Agallagher" wrote in message
...
I need to find the total if conditions in two columns are met. I'm doing a
school lottery for enrollment and need to see how many students met the
criteria "yes" in a specific grade level "1".

Example:

Column A Column B
Yes 1
3
Yes 1
1

I'm looking for the total number of times yes and 1 are in the same row.
Here it is 2 times.

Thanks for any help anyone can give me.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Agallagher
 
Posts: n/a
Default sum if conditions in two columns are met?

Biff,

Tried again and it worked. Thanks so much for your help. You have made my
life much easier. Will this same function work if the second product
(B1:B100=1) is text not numeric? Example: (B1:B100=KG)? or do I need to have
" around the KG as "KG"?

"Agallagher" wrote:

Biff,

Thanks. This worked however now I would like to place the totals on a
separate tab in the same worksheet. What additional information do I need to
add to this string. Below is what I tried but I received a #VALUE! error.

=SUMPRODUCT(--('Current Students'!K2:K1000="YES"),--('Current
Students'!N2:N1000=1))

"Biff" wrote:

Hi!

Try this:

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

Biff

"Agallagher" wrote in message
...
I need to find the total if conditions in two columns are met. I'm doing a
school lottery for enrollment and need to see how many students met the
criteria "yes" in a specific grade level "1".

Example:

Column A Column B
Yes 1
3
Yes 1
1

I'm looking for the total number of times yes and 1 are in the same row.
Here it is 2 times.

Thanks for any help anyone can give me.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default sum if conditions in two columns are met?

If the logical test value is TEXT, yes, you need to enclose it in quotes:

(B1:B100="KG")

If the logical test value is numeric DO NOT use quotes.

A better way to do this would be to use cells to hold the criteria and then
refer to those cells:

A1 = Yes
B1 = 1 or KG (or whatever)

=SUMPRODUCT(--(A5:A100=A1),--(B5:B100=B1)

Biff

"Agallagher" wrote in message
...
Biff,

Tried again and it worked. Thanks so much for your help. You have made
my
life much easier. Will this same function work if the second product
(B1:B100=1) is text not numeric? Example: (B1:B100=KG)? or do I need to
have
" around the KG as "KG"?

"Agallagher" wrote:

Biff,

Thanks. This worked however now I would like to place the totals on a
separate tab in the same worksheet. What additional information do I
need to
add to this string. Below is what I tried but I received a #VALUE!
error.

=SUMPRODUCT(--('Current Students'!K2:K1000="YES"),--('Current
Students'!N2:N1000=1))

"Biff" wrote:

Hi!

Try this:

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

Biff

"Agallagher" wrote in message
...
I need to find the total if conditions in two columns are met. I'm
doing a
school lottery for enrollment and need to see how many students met
the
criteria "yes" in a specific grade level "1".

Example:

Column A Column B
Yes 1
3
Yes 1
1

I'm looking for the total number of times yes and 1 are in the same
row.
Here it is 2 times.

Thanks for any help anyone can give me.







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
Help with grouping columns couriced New Users to Excel 5 September 2nd 05 05:07 PM
how to combine several columns into a single column jims Excel Discussion (Misc queries) 9 August 15th 05 12:00 PM
Hiding columns and custom views problem Bettergains Excel Discussion (Misc queries) 2 April 12th 05 11:48 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM
Counting the Contents of Two Columns Molochi Excel Discussion (Misc queries) 6 December 22nd 04 08:13 PM


All times are GMT +1. The time now is 12:32 AM.

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

About Us

"It's about Microsoft Excel"