+ Reply to Thread
Results 1 to 7 of 7

Caculating Semi Colon in Range

  1. #1
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    101

    Caculating Semi Colon in Range

    Hi All,

    Good Evening. I need help to calculate the semicolon count in a range. The array contains data which is separated by a semicolon.

    Column A

    A;C;D
    A;C
    A;D;F;G;R
    A;E;F
    A;F;G;H;Y;T
    A;G;T;Y;U

    I want to calculate how many cells has more than 2 semicolons in a range. For the above example, the answer would be 3. I have tried this "=SUMPRODUCT(LEN(A:A)-LEN(SUBSTITUTE(A:A,";","")))" formula. but I don't know how to include the countif formula in this. Thanks in advance!
    Manikandan Arumugam
    Excel Learner

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    1,558

    Re: Caculating Semi Colon in Range

    I am not sure but:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or as with array formula:
    Please Login or Register  to view this content.
    (accept with CSE)
    Last edited by KOKOSEK; 09-19-2019 at 06:53 AM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Guru Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    24,318

    Re: Caculating Semi Colon in Range

    Hi try this:

    =SUMPRODUCT(--(LEN($A$2:$A$7)-LEN(SUBSTITUTE(A2:A7,";",""))=2))

    Don't use whole column ranges with SP. It can get slow...
    Attached Files Attached Files
    Glenn



  4. #4
    Forum Guru Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    24,318

    Re: Caculating Semi Colon in Range

    Oops. Mine should be

    =SUMPRODUCT(--(LEN($A$2:$A$7)-LEN(SUBSTITUTE(A2:A7,";",""))>2))

  5. #5
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    101

    Re: Caculating Semi Colon in Range

    Thanks for your reply, Kokosek. It works fine as I expected. It will be more useful for me to learn if it is with sumproduct formula.

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    1,558

    Re: Caculating Semi Colon in Range

    EDIT: delete. 1st Glenn's formula counted incorrectly.
    I don't see the point to use SUMPRODUCT if COUNT do the job but its your choice
    Last edited by KOKOSEK; 09-19-2019 at 07:01 AM.

  7. #7
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    101

    Re: Caculating Semi Colon in Range

    Great Glenn. Thanks for your valuable time. You made my day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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