Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 4
Smile countif with some conditions

I have 2 WS, The first 1 I update regularly the second 1 is my monthly summary.

I use countif in WeeklySummary to tally the am & pm, the formula I have is =IF(A:A="permanent", COUNTIF(B:B,"am"))

"am" that is permanent
"am" that is temporary
"pm" that is permanent
"pm" that is temporary

Thanks in advance for any help ☺
Attached Images
 

Last edited by BenEastCoast : September 5th 13 at 12:15 PM
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default countif with some conditions

On Wednesday, September 4, 2013 9:02:25 PM UTC-7, BenEastCoast wrote:
I have 2 WS (pls see attached), The first 1 I update regularly the

second 1 is my monthly summary.



I use countif in WeeklySummary, how do I count the:



"am" that is permanent

"am" that is temporary

"pm" that is permanent

"pm" that is temporary



Thanks in advance for any help ☺





+-------------------------------------------------------------------+

|Filename: countif.jpg |

|Download: http://www.excelbanter.com/attachment.php?attachmentid=910|

+-------------------------------------------------------------------+


--

BenEastCoast


Give these a try.

"am" that is permanent =SUMPRODUCT(--($A$2:$A$10="PER")*($B$2:$B10="AM"))
"am" that is temporary =SUMPRODUCT(--($A$2:$A$10="TEM")*($B$2:$B10="AM"))
"pm" that is permanent =SUMPRODUCT(--($A$2:$A$10="PER")*($B$2:$B10="PM"))
"pm" that is temporary =SUMPRODUCT(--($A$2:$A$10="TEM")*($B$2:$B10="PM"))


Regards,
Howard

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default countif with some conditions

Hi Ben,

Am Thu, 5 Sep 2013 05:02:25 +0100 schrieb BenEastCoast:

I have 2 WS (pls see attached), The first 1 I update regularly the
second 1 is my monthly summary.

I use countif in WeeklySummary, how do I count the:

"am" that is permanent
"am" that is temporary
"pm" that is permanent
"pm" that is temporary


in B2 of Book2:
=SUMPRODUCT(--([Book1]Sheet1!$A$2:$A$100=$A2),--([Book1]Sheet1!$B$2:$B$100=B$1))
and copy to the right and down.


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default countif with some conditions

Hi again,

Am Thu, 5 Sep 2013 13:38:37 +0200 schrieb Claus Busch:

in B2 of Book2:
=SUMPRODUCT(--([Book1]Sheet1!$A$2:$A$100=$A2),--([Book1]Sheet1!$B$2:$B$100=B$1))


sorry, I had a false sheet name.
Try:
=SUMPRODUCT(--([Book1.xlsx]Tabelle1!$A$2:$A$100=$A2),--([Book1.xlsx]Tabelle1!$B$2:$B$100=B$1))
or in Excel version 2007 or later:
=COUNTIFS([Book1.xlsx]Tabelle1!$A$2:$A$100,$A2,[Book1.xlsx]Tabelle1!$B$2:$B$100,B$1)


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default countif with some conditions

hi,

Am Thu, 5 Sep 2013 13:50:27 +0200 schrieb Claus Busch:

=SUMPRODUCT(--([Book1.xlsx]Tabelle1!$A$2:$A$100=$A2),--([Book1.xlsx]Tabelle1!$B$2:$B$100=B$1))
or in Excel version 2007 or later:
=COUNTIFS([Book1.xlsx]Tabelle1!$A$2:$A$100,$A2,[Book1.xlsx]Tabelle1!$B$2:$B$100,B$1)


sorry I copied the wrong formula.
=COUNTIFS([Book1.xlsx]IUpdateRegularly!$A$2:$A$100,$A2,[Book1.xlsx]IUpdateRegularly!$B$2:$B$100,B$1)
or
=SUMPRODUCT(--([Book1.xlsx]IUpdateRegularly!$A$2:$A$100=$A2),--([Book1.xlsx]IUpdateRegularly!$B$2:$B$100=B$1))


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


  #6   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by Claus Busch View Post
hi,

Am Thu, 5 Sep 2013 13:50:27 +0200 schrieb Claus Busch:

=SUMPRODUCT(--([Book1.xlsx]Tabelle1!$A$2:$A$100=$A2),--([Book1.xlsx]Tabelle1!$B$2:$B$100=B$1))
or in Excel version 2007 or later:
=COUNTIFS([Book1.xlsx]Tabelle1!$A$2:$A$100,$A2,[Book1.xlsx]Tabelle1!$B$2:$B$100,B$1)


sorry I copied the wrong formula.
=COUNTIFS([Book1.xlsx]IUpdateRegularly!$A$2:$A$100,$A2,[Book1.xlsx]IUpdateRegularly!$B$2:$B$100,B$1)
or
=SUMPRODUCT(--([Book1.xlsx]IUpdateRegularly!$A$2:$A$100=$A2),--([Book1.xlsx]IUpdateRegularly!$B$2:$B$100=B$1))


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
I will try your formula. Thanks for the reply Claus B. Cheers
  #7   Report Post  
Junior Member
 
Posts: 4
Thumbs up

Quote:
Originally Posted by BenEastCoast View Post
I will try your formula. Thanks for the reply Claus B. Cheers
****

Thanks a lot for the formula Claus B. It works!
  #8   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by View Post
On Wednesday, September 4, 2013 9:02:25 PM UTC-7, BenEastCoast wrote:
I have 2 WS (pls see attached), The first 1 I update regularly the

second 1 is my monthly summary.



I use countif in WeeklySummary, how do I count the:



"am" that is permanent

"am" that is temporary

"pm" that is permanent

"pm" that is temporary



Thanks in advance for any help ☺





+-------------------------------------------------------------------+

|Filename: countif.jpg |

|Download: http://www.excelbanter.com/attachment.php?attachmentid=910|

+-------------------------------------------------------------------+


--

BenEastCoast


Give these a try.

"am" that is permanent =SUMPRODUCT(--($A$2:$A$10="PER")*($B$2:$B10="AM"))
"am" that is temporary =SUMPRODUCT(--($A$2:$A$10="TEM")*($B$2:$B10="AM"))
"pm" that is permanent =SUMPRODUCT(--($A$2:$A$10="PER")*($B$2:$B10="PM"))
"pm" that is temporary =SUMPRODUCT(--($A$2:$A$10="TEM")*($B$2:$B10="PM"))


Regards,
Howard
Thanks for the reply Howard, I got it working :)
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
Countif with two conditions Jean-Bernard STROOBANT Excel Worksheet Functions 10 August 13th 08 06:05 PM
Countif Conditions - Use of conditions that vary by cell value JonTarg Excel Discussion (Misc queries) 1 May 30th 08 01:21 PM
Countif with two conditions Bob Phillips Excel Discussion (Misc queries) 0 July 3rd 07 09:37 PM
Countif with 2 conditions DTTODGG Excel Worksheet Functions 7 June 5th 07 08:54 PM
countif two conditions Penny Excel Discussion (Misc queries) 4 May 27th 05 01:59 AM


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