Countif

Viessa

New Member
Joined
Nov 11, 2017
Messages
8
I need a formula to count how many times the word Melissa appears in specific columns
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi,

If your columns are contiguous, then you can use COUNTIF with a range:


Excel 2010
ABCDEF
1MelissaGeorge3
2Melissa
3Paul
4PaulMelinda
5John
6Joe
7Melissa
8Jack
9
10
Sheet1
Cell Formulas
RangeFormula
F1=COUNTIF(A1:D10,"Melissa")
 
Last edited:
Upvote 0
Using the same setup jtakw used try

Code:
=SUMPRODUCT((MOD(COLUMN($A$1:$D$10), 2)=0)*($A$1:$D$10="Melissa"))

There is likely some other, more elegant solutions.
 
Upvote 0
Only in column B and D

Hi,

If it's just the 2 Columns, you can simply sum the COUNTIF:


Excel 2010
ABCDEF
1MelissaGeorge4
2Melissa
3Paul
4PaulMelissaMelinda
5John
6Melissa
7Melissa
8Jack
9Melissa
10
Sheet2
Cell Formulas
RangeFormula
F1=SUM(COUNTIF(B1:B10,"Melissa"),COUNTIF(D1:D10,"Melissa"))
 
Last edited:
Upvote 0
Not just to row 10 I have =countif(B:D,"MELISSA*") but if Melissa is mistakenly put in column c it is counting it and I don't want it to

Code:
=SUMPRODUCT((MOD(COLUMN($A$1:$D$10), 2)=0)*($A$1:$D$10="Melissa"))

There is likely some other, more elegant solutions.[/QUOTE]
 
Upvote 0
Not just to row 10 I have =countif(B:D,"MELISSA*") but if Melissa is mistakenly put in column c it is counting it and I don't want it to

Code:
=SUMPRODUCT((MOD(COLUMN($A$1:$D$10), 2)=0)*($A$1:$D$10="Melissa"))

There is likely some other, more elegant solutions.
[/QUOTE]

Actually, mrhstn's formula won't count Column C because it's counting only Even Columns, in this case, B and D.

However, you can use my simpler formula above in Post #5 , adjust the cell/row references to include your range of data.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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