Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lori_tig
 
Posts: n/a
Default How do I compare two values to calculate a total?

I'm trying to compare two columns, and count it as "1" in a total, if both
cells meet individual criteria, to see if we have enough players for a
softball game.

Column D states whether the player is M of F, and column G lists a Y or N as
to whether that player is available for that specific game. So, I want to
count all the cells where D="F" and G="N", but only when both conditions are
true. This is for range 2:22 in both columns. Seemed simple enough when I
started, but I'm doing something wrong.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default How do I compare two values to calculate a total?

=SUMPRODUCT(--(D2:D200="F"),--(G2:G200="N"))

=SUMPRODUCT(--(D2:D200=H1),--(G2:G200=H2))

where H1 holds F and H2 N

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"lori_tig" wrote in message
...
I'm trying to compare two columns, and count it as "1" in a total, if both
cells meet individual criteria, to see if we have enough players for a
softball game.

Column D states whether the player is M of F, and column G lists a Y or N
as
to whether that player is available for that specific game. So, I want to
count all the cells where D="F" and G="N", but only when both conditions
are
true. This is for range 2:22 in both columns. Seemed simple enough when
I
started, but I'm doing something wrong.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lori_tig
 
Posts: n/a
Default How do I compare two values to calculate a total?

Thanks!!

"Peo Sjoblom" wrote:

=SUMPRODUCT(--(D2:D200="F"),--(G2:G200="N"))

=SUMPRODUCT(--(D2:D200=H1),--(G2:G200=H2))

where H1 holds F and H2 N

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"lori_tig" wrote in message
...
I'm trying to compare two columns, and count it as "1" in a total, if both
cells meet individual criteria, to see if we have enough players for a
softball game.

Column D states whether the player is M of F, and column G lists a Y or N
as
to whether that player is available for that specific game. So, I want to
count all the cells where D="F" and G="N", but only when both conditions
are
true. This is for range 2:22 in both columns. Seemed simple enough when
I
started, but I'm doing something wrong.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default How do I compare two values to calculate a total?

Hi,

While sumproduct is a better solution, another solution is array formulas
(Ctrl+Shift+Enter)

=sum(if((D2:D22="F")*(G2:G22="N"),1,0))

Regards,

Ashish Mathur

"lori_tig" wrote:

I'm trying to compare two columns, and count it as "1" in a total, if both
cells meet individual criteria, to see if we have enough players for a
softball game.

Column D states whether the player is M of F, and column G lists a Y or N as
to whether that player is available for that specific game. So, I want to
count all the cells where D="F" and G="N", but only when both conditions are
true. This is for range 2:22 in both columns. Seemed simple enough when I
started, but I'm doing something wrong.

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
Calculate total interest earned on a loan and monthly payment Matt Stanley Excel Worksheet Functions 4 May 4th 23 03:42 AM
Can Excel calculate populate table using row/column values & calc's on other sheet? wildswing Excel Discussion (Misc queries) 1 January 26th 06 06:18 AM
total value relating to cell values in multiple columns! via135 Excel Discussion (Misc queries) 3 January 25th 06 06:43 PM
How do i compare data fields and assign values? BmxMom101 Excel Worksheet Functions 0 November 10th 05 03:43 PM
How do I calculate Amount of Sales Tax from Total Amount? MikeS Excel Worksheet Functions 1 March 26th 05 07:49 PM


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