Hi
I have a column with a different alphanumeric strings in each cell. Some of these values have a portion that is common. For e.g.:
Example kealey 1980
Testing
Reference
Example john commission
Example (hard sell)
Is there a formula to return the number of cells that have "Example" in them?
Last edited by kaydee; 11-03-2008 at 09:08 AM. Reason: solved
=COUNTIF(range,"Example*")
assuming you don't want to find
testing Example testing
if you do:
=COUNTIF(range,"*Example*")
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thank you, but I already tried this. Sorry - I think my example was not accurate.
Actually the common factor here is a number (1980) at the beginning. When applied, this formula does not count cells which only have "1980". So, for
1980 kealey
Testing
Reference
1980 john commission
1980
1980 (hard sell)
it returns a count of 3 while I want it to be 4.
Sorry for confusion![]()
Given mixed data types (text and numerics) you could use something like:
=SUMPRODUCT(--(ISNUMBER(SEARCH("1980",A1:A6))))
or combine 2 Countif's
=COUNTIF(A1:A6,"*1980*")+COUNTIF(A1:A6,1980)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Try this it will count TEXT and NUMBERS
=COUNTIF(A1:A6,"*1980*")+COUNTIF(A1:A6,1980)
oldchippy
-------------
![]()
![]()
If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
Both worked but I used the SUMPRODUCT function!
Thanks to both of you for taking the time to respond, and sorry for not being clear enough in the first post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks