Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2014, 05:27 PM
Alaska1 Alaska1 is offline Count if statement Windows 7 64bit Count if statement Office 2007
Advanced Beginner
Count if statement
 
Join Date: Nov 2011
Posts: 96
Alaska1 is on a distinguished road
Default Count if statement

I have a two worksheets. I need to add two count if statements together. I need to have it calculate the person's name which is column c and then calculate the category total.



Example:

Elmer Smith
Merrick 1
Baldwin 1
Bellmore 1


The formula I have created is not calculating correctly. I have attached the worksheet.
Attached Files
File Type: xlsx Book1.xlsx (8.3 KB, 17 views)
Reply With Quote
  #2  
Old 05-21-2014, 02:10 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Count if statement Windows 7 64bit Count if statement Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi your example result is not consistent with the data. How to you get 5 everywhere ? You could try a Pivot Table
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 05-21-2014, 02:53 AM
Alaska1 Alaska1 is offline Count if statement Windows 7 64bit Count if statement Office 2007
Advanced Beginner
Count if statement
 
Join Date: Nov 2011
Posts: 96
Alaska1 is on a distinguished road
Default

Hi

I know it is not consistent. The formula is not right. I was asking if anyone knew what is wrong with the formula. Thank you for reply.
Reply With Quote
  #4  
Old 05-21-2014, 09:48 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Count if statement Windows 7 64bit Count if statement Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Like this ?
Attached Files
File Type: xlsx Book1.xlsx (12.1 KB, 12 views)
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 05-21-2014, 09:52 AM
BobBridges's Avatar
BobBridges BobBridges is offline Count if statement Windows 7 64bit Count if statement Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Alaska, I don't think you can use COUNTIF for this function. As I understand it, you want to count the rows in 2014!$B:$C where two conditions apply, a certain value in B and a certain value in C. The way you have it, using two COUNTIFs, it counts all the times the name appears in column B, and then adds to it the number of times "Merrick" appears in column C.

For this you probably need COUNTIFS....yeah, I think that works. Take a look at the attached. I left your formula in column B for comparison, and added COUNTIFS to C:E.
Attached Files
File Type: xlsx x.xlsx (9.0 KB, 8 views)
Reply With Quote
  #6  
Old 05-21-2014, 03:36 PM
Alaska1 Alaska1 is offline Count if statement Windows 7 64bit Count if statement Office 2007
Advanced Beginner
Count if statement
 
Join Date: Nov 2011
Posts: 96
Alaska1 is on a distinguished road
Default

Thank you for your reply. I got it to work.

Thank you again
Reply With Quote
  #7  
Old 05-21-2014, 03:57 PM
macropod's Avatar
macropod macropod is offline Count if statement Windows 7 32bit Count if statement Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can do it easily enough with:
=COUNTIF('2014'!C2:C9,$A3)+COUNTIF('2014'!B2:B9,B$ 2)
The problem with your formula was the having "A3" instead of, for example, A3.

If you want a count where only both conditions are met, try:
=SUMPRODUCT((('2014'!C2:C9)=$A3)*(('2014'!B2:B9)=B $2))
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 05-30-2014, 08:57 AM
SteveBump SteveBump is offline Count if statement Windows 7 64bit Count if statement Office 2010 64bit
Novice
 
Join Date: Oct 2013
Posts: 24
SteveBump is on a distinguished road
Default Count If Statement

The attached spreadsheet I believe does what you want to do. Your biggest problem was using the quotes when defining the comparison cell. I removed the quotes and inserted some $ to help when you copy/paste the formula to minimize the amount of editing that will be needed.

Look at the formulas in the yellow shaded area for what I did.

Good luck.
Attached Files
File Type: xlsx Solved - 2 CountIF statements.xlsx (9.4 KB, 8 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a statement sma Word 6 03-23-2014 10:30 AM
Count if statement Need help with If, Then Statement Please cangelis Excel 4 01-03-2014 09:10 AM
Count if statement Help with IF Statement limpbizkit Excel 4 02-24-2011 09:16 PM
Count if statement if statement piper7971 PowerPoint 1 08-19-2010 07:10 AM
Count if statement Help with IF statement! CPelkey Word 1 04-12-2010 09:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft