Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2012, 05:00 AM
sonyaturpin sonyaturpin is offline countifs? Windows XP countifs? Office 2007
Novice
countifs?
 
Join Date: May 2012
Posts: 1
sonyaturpin is on a distinguished road
Default countifs?

Hi, I am trying to use the countifs function to count the total number of times i can see both the word "sales" and "marketing" in a list. The function i've typed in is =countifs(A1:A12,"sales",A1:A12,"marketing"). The result I get is zero. When I've tried using this function with one or the other (sales or marketing but not both), I get a result. Any suggestions? Many thanks!
Reply With Quote
  #2  
Old 05-23-2012, 08:29 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline countifs? Windows 7 32bit countifs? Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi,

A cell can't contain the exact value "sales" and the exact value "marketing", so your COUNTIFS() formula returns 0.

Assuming you want to count the cells in A1:A12 which are "sales" OR "marketing" you can do it like this:

=COUNTIF(A1:A12,"sales")+COUNTIF(A1:A12,"marketing ")

or

=SUM(COUNTIF(A1:A12,{"sales","marketing"}))

or

=SUMPRODUCT(COUNTIF(A1:A12,B1:B2))
where B1 has the word sales and B2 has the word marketing
__________________
Colin

RAD Excel Blog
Reply With Quote
Reply



Other Forums: Access Forums

All times are GMT -7. The time now is 09:05 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