Count occurrences of certain words based on another cell

Drew_

Board Regular
Joined
Jul 8, 2017
Messages
87
Hi all.

I have a column that will populate with text whenever entries are made. I want to count how many times certain words appear after other, separate words. For example, whenever a cell says "Bogey", I want to count how many time the very next cell says "Birdie" or "Eagle". Right now, I have a formula that works great:

=COUNTIFS(L7:L25,"*Bogey",L8:L26,"Birdie")/COUNTIF(L7:L25,"*Bogey")

However, this only counts the number of "Birdie" occurrences, and not "Eagle". I have a feeling I can accomplish what I want with the SUMPRODUCT or OR formulas but I don't know. Any help would be appreciated, thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi all.

I have a column that will populate with text whenever entries are made. I want to count how many times certain words appear after other, separate words. For example, whenever a cell says "Bogey", I want to count how many time the very next cell says "Birdie" or "Eagle". Right now, I have a formula that works great:

=COUNTIFS(L7:L25,"*Bogey",L8:L26,"Birdie")/COUNTIF(L7:L25,"*Bogey")

However, this only counts the number of "Birdie" occurrences, and not "Eagle". I have a feeling I can accomplish what I want with the SUMPRODUCT or OR formulas but I don't know. Any help would be appreciated, thanks

=(COUNTIFS(L7:L25,"*Bogey",L8:L26,"Birdie")+COUNTIFS(L7:L25,"*Bogey",L8:L26,"Eagle"))/COUNTIF(L7:L25,"*Bogey")
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,853
Members
449,471
Latest member
lachbee

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