Count number of cells with a specific text

sajo9670

New Member
Joined
Nov 13, 2012
Messages
31
Hi,
I am trying to count the number of cells matching a text (weekly, monthly, bi-monthly ect). The problem is that the range cannot be A1:A30, rather it is A10;A14;A18;A22....

How would I go about calculating the number of cells in the sheet where the actual sales in catman solution is weekly reported? In this case the answer should be 2.

Column1Actual salesPromo salesActual sales distribution weightPromo sales distribution weight
NielsenBi-monthlyBi-monthlyBi-monthly
CatMan SolutionWeeklyWeekly
Source 3
Column1Actual salesPromo salesActual sales distribution weightPromo sales distribution weight
Nielsen
CatMan SolutionWeeklyWeekly
Source 3

<tbody>
</tbody><colgroup><col><col><col><col><col></colgroup>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Why can't it be A1:A30? Is it because there are false positives in that range or is it because data wouldn't appear in cells other than A10, A14, A18, etc. If it's because data won't appear, I wouldn't sweat calculating empty cells, as it will return a 0 and won't impact the final count.

Pre-excel 2007 version:

=Sumproduct(--(A1:A30="CatMan Solution"), --(B1:B30="Weekly"))

2007 or greater:
=COUNTIFS(B1:B30,"Weekly",A1:A30,"CatMan Solution")

There's no valid reason why I switched the arguements in the CountifS formula....they return the same value).
 
Upvote 0
It is because of false positives. I need to know the actual sales from only Catman solutions. If I use A1:A30 then the actual sales for Nielsen and source 3 would be included which they should not.
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,977
Members
449,200
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top