Count in Excel

cansevin
cansevin used Ask the Experts™
on
Attached I have a file for reference. Column A lists the line items of an invoice. There are two type of items. One states "Mobile Bath" and the other states "Bath & Groom".

I need Column to count how many times it says "Bath & Groom". I need column C to count how many times it says "Mobile Bath"
CoutinExcel.xlsx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015
Commented:
Try this...

In B2
=(LEN(A2)-LEN(SUBSTITUTE(A2,"Bath & Groom","")))/LEN("Bath & Groom")

Open in new window


In C2
=(LEN(A2)-LEN(SUBSTITUTE(A2,"Mobile Bath","")))/LEN("Mobile Bath")

Open in new window

And then copy both the formulas down.
CoutinExcel.xlsx

Author

Commented:
You are amazing. Made my morning. Thanks! Merry Christmas!
Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015

Commented:
You're welcome! Glad it worked as desired.
Thanks and Merry Christmas to you too. :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial