+ Reply to Thread
Results 1 to 4 of 4

Count number of cells with a string length greater than X

  1. #1
    Registered User
    Join Date
    05-19-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    23

    Count number of cells with a string length greater than X

    Hi forum,

    I'm trying to come up with a formula for the above.

    I have a range of cells A1:A100 and each cell can have differing string lengths. I need to count the number of times the string length of each cell is greater than X. Lets say in cell B1 the value of X is stored.

    I did try COUNTIF in combination with LEN , but couldn't get this to work

    Many thanks
    David
    Last edited by pukks; 05-19-2010 at 04:21 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count number of cells with a string length greater than X

    Perhaps:

    =COUNTIF(A1:A100,REPT("?",B1)&"*")

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count number of cells with a string length greater than X

    Try:

    =SUMPRODUCT(--(LEN(A1:A100)>B1))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    05-19-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Count number of cells with a string length greater than X

    Thanks for the help, speedily too. Have used the sumproduct formula on this one. Thanks again, Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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