+ 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
    2013
    Posts
    128

    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
    2,742

    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 Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    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




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    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
    2013
    Posts
    128

    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
    2,742

    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
    2013
    Posts
    128

    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)

Similar Threads

  1. Mid after semi colon before space
    By tonym33 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-29-2019, 02:45 AM
  2. [SOLVED] Semi Colon not Comma why
    By Derrick T. Davidson in forum Excel General
    Replies: 5
    Last Post: 12-08-2015, 02:35 AM
  3. [SOLVED] If formula for text before and after a semi colon
    By charlesonmission in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-21-2015, 05:39 PM
  4. Separating semi-colon between numbers.
    By ae.chun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2013, 10:42 PM
  5. add a semi colon after each email address
    By loniponi2000 in forum Excel General
    Replies: 1
    Last Post: 08-16-2012, 11:16 AM
  6. How to add semi colon : ?
    By OceanBlue in forum Excel General
    Replies: 4
    Last Post: 04-27-2011, 08:25 PM
  7. convert time without using a semi colon
    By daznav in forum Excel General
    Replies: 6
    Last Post: 07-23-2010, 02:18 AM

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