+ Reply to Thread
Results 1 to 10 of 10

Counting strings

  1. #1
    Registered User
    Join Date
    09-15-2015
    Location
    Italy
    MS-Off Ver
    2019
    Posts
    49

    Counting strings

    Hi!
    In the attached file i'm trying to count cells in which a string appears.
    the problem is the quantity: if in A5 i set 2, it means I'd like to count twice the products in raw C5:E5

    is it possible to solve this problem with a SUMPRODUCT?
    The correct result in G1 is 3
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Counting strings

    Administrative Note:

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Counting strings

    Like this ?
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Counting strings

    Please Login or Register  to view this content.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  5. #5
    Registered User
    Join Date
    09-15-2015
    Location
    Italy
    MS-Off Ver
    2019
    Posts
    49

    Re: Counting strings

    Why
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is not working? Usually i use more than 1 array with SUMPRODUCT

    Quote Originally Posted by AliGW View Post
    Please check that your forum profile is up-to-date in this respect.
    I updated, thanks for the reminder

  6. #6
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Counting strings

    You were trying to multiply before converting true/false to 1/0, try the formula below.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-15-2015
    Location
    Italy
    MS-Off Ver
    2019
    Posts
    49

    Re: Counting strings

    Understood. What about if I have a table, for example
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Counting strings

    You don't seem to have taken a moment to read my solution in post #3 ? The order of arrays is important but there is no need for double anarry

  9. #9
    Registered User
    Join Date
    09-15-2015
    Location
    Italy
    MS-Off Ver
    2019
    Posts
    49

    Re: Counting strings

    Quote Originally Posted by Pepe Le Mokko View Post
    You don't seem to have taken a moment to read my solution in post #3 ?
    It works fine thanks, but i'd like to understand how to use table, not only arrays

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Counting strings

    Just make a Table from your existing range , then build the formula as usual by selecting the ranges you need. XL will automatically add the structured references

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Counting Strings across columns
    By genghis in forum Excel General
    Replies: 3
    Last Post: 01-09-2014, 09:12 PM
  2. Counting strings when may be 2 strings in a cell
    By kathyvanemm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-09-2013, 08:49 PM
  3. [SOLVED] Counting Strings
    By Ryuujin in forum Excel General
    Replies: 4
    Last Post: 07-28-2012, 10:36 AM
  4. problem counting strings
    By mehdoush in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-25-2009, 01:57 AM
  5. Counting Strings
    By gusto in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-20-2008, 11:43 PM
  6. Counting strings
    By taji in forum Excel General
    Replies: 2
    Last Post: 01-31-2008, 12:15 PM
  7. Counting strings in string
    By Jivo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-03-2006, 08:11 AM
  8. [SOLVED] Counting text strings
    By 525047 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-21-2006, 12:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1