+ Reply to Thread
Results 1 to 4 of 4

How to Exclude text in string in a single cell

  1. #1
    Registered User
    Join Date
    04-04-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    How to Exclude text in string in a single cell

    Hi Guys

    I have been using to count the strings in between commas in ONE cell

    =IF(A2<>"",LEN(A2)-LEN(SUBSTITUTE(A2,",",""))+1,"")


    However now i'd like to exclude both the text : "Supervisor" and "Preliminary" string from my cell. ie

    One Cell has a list of trades: Joinery & Cabinets, Plumbing, Plaster, Carpentry and Joinery, Painter and Decorator, Electrician, No Class Name, Internal Tiling, Preliminary, Concreter, Supervisor, Asbestos, Floor Sanding, Demolition , Low Rise Builder, Garage Doors

    Using the IF statement I get a count: 16

    I'd like for the IF statement to be able to give a count of 14; by not counting "Supervisor" and "Preliminary" text in the string, thanks guys


    Thanks guys for looking at this for me.

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

    Re: How to Exclude text in string in a single cell

    Perhaps
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-04-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to Exclude text in string in a single cell

    Thanks for trying it out Pepe. Unfortunately didn't work.....

    I've uploaded a sample file. I am trying to replicate the light blue "count of trade class" field, without using Macros VB

    Thanks guysss....
    Attached Files Attached Files
    Last edited by leopoldc; 10-28-2013 at 06:35 AM.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to Exclude text in string in a single cell

    perhaps
    =IF(A2<>"",LEN(A2)-LEN(SUBSTITUTE(A2,",",""))+1-SUM(COUNTIF(A2,{"*Supervisor*","*Preliminary*"})),"")
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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. [SOLVED] Find partial text string within another text string return original text into cell.
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-17-2013, 02:58 PM
  2. [SOLVED] Find text between 2 characters with multiple instances in a single string
    By mforbes6186 in forum Excel General
    Replies: 3
    Last Post: 02-09-2013, 11:56 AM
  3. [SOLVED] Insert a NAME into a text string in a single cell
    By cptkeith in forum Excel General
    Replies: 1
    Last Post: 12-17-2012, 06:04 PM
  4. Exclude a single cell from a calculation
    By kdecyk in forum Excel General
    Replies: 2
    Last Post: 05-23-2011, 04:40 PM
  5. How to exclude single cell from printing
    By brodiemac in forum Excel General
    Replies: 3
    Last Post: 03-01-2006, 04:30 PM

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