Need count formula :: MrExcel Message Board



 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Need count formula
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

kelly1
Board Regular


Joined: 11 May 2003
Posts: 85


Status: Offline

 Reply with quote  

Need count formula

I need to create an analysis on ‘sheet 2’ of the data on ‘sheet 1’


I need a formula that counts the occurrences of when the following match:

Sheet 2 ‘Column A’ = ‘Date’
Sheet 1 ‘Column G’ = ‘Date’
Sheet 1 ‘Column I’ = ‘Finish’
Sheet 1 ‘Column K’ = ‘Paul’

And put the result in Sheet 2 ‘Column B’

Any help appreciated

Kelly

Post Fri Sep 19, 2003 6:20 pm 
 View user's profile Send private message

Mark W.
MrExcel MVP


Joined: 11 Feb 2002
Posts: 7146
Location: Austin, Texas USA
Flag: Usa

Status: Offline

 Reply with quote  

Re: Need count formula

quote:
Originally posted by kelly1:
I need to create an analysis on ‘sheet 2’ of the data on ‘sheet 1’


I need a formula that counts the occurrences of when the following match:

Sheet 2 ‘Column A’ = ‘Date’
Sheet 1 ‘Column G’ = ‘Date’
Sheet 1 ‘Column I’ = ‘Finish’
Sheet 1 ‘Column K’ = ‘Paul’

And put the result in Sheet 2 ‘Column B’

Any help appreciated

Kelly


Did you mean Sheet 2 (in red) above?

Post Fri Sep 19, 2003 6:23 pm 
 View user's profile Send private message

earlyd
Board Master


Joined: 11 Dec 2002
Posts: 955

Flag: Usa

Status: Offline

 Reply with quote  

Re: Need count formula

=Countif(Sheet2!A:A,"=Date") + Countif(Sheet1!G:G,"=Date") + ... and so forth

Post Fri Sep 19, 2003 6:23 pm 
 View user's profile Send private message

Mark W.
MrExcel MVP


Joined: 11 Feb 2002
Posts: 7146
Location: Austin, Texas USA
Flag: Usa

Status: Offline

 Reply with quote  

Re: Need count formula

Also, were you interested in the concurrence of these values?

Post Fri Sep 19, 2003 6:26 pm 
 View user's profile Send private message

Aladin Akyurek
.


Joined: 15 Feb 2002
Posts: 14083
Location: The Hague
Flag: Blank

Status: Offline

 Reply with quote  

Re: Need count formula

Given the way you specify what must be counted...

=SUMPRODUCT((Sheet1!$A$2:$A$100=A2)*(Sheet1!$I$2:$I$100="Finish")*(Sheet1!$K$2:$K$100="Paul"))

If this is way off, try again.

Post Fri Sep 19, 2003 6:28 pm 
 View user's profile Send private message

kelly1
Board Regular


Joined: 11 May 2003
Posts: 85


Status: Offline

 Reply with quote  

I used the sumproduct and it worked fine.
I had a similar one but wanted to be sure and get other opinions as I am working on such a vital project for work.

Thanks for the help

kelly

Post Fri Sep 19, 2003 7:04 pm 
 View user's profile Send private message

Mark W.
MrExcel MVP


Joined: 11 Feb 2002
Posts: 7146
Location: Austin, Texas USA
Flag: Usa

Status: Offline

 Reply with quote  

Re: Need count formula

Since you expressed an interest in varied approaches, here's another...

{=COUNT(IF(Sheet1!$A$2:$A$100=A2,IF(Sheet1!$I$2:$I$100="Finish",IF(Sheet1!$K$2:$K$100="Paul",1))))}

Note: This is an array formula which must be entered using the Control+Shift+Enter key combination. The outermost braces, { }, are not entered by you -- they're supplied by Excel in recognition of a properly entered array formula. For more on array formulas see the Excel Help topic for "About array formulas...".

Post Fri Sep 19, 2003 7:20 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.