+ Reply to Thread
Results 1 to 5 of 5

Discerning between partial text and frequency counting

  1. #1
    Registered User
    Join Date
    10-05-2021
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    10

    Question Discerning between partial text and frequency counting

    Hi there! I am trying to collect the frequency of diagnosis from a datbase, the problem is these are al written reports. I want to count the frequency of No adenoma found, however I also need the frequency of adenomas found.

    I used:
    =(LEN(A2)-LEN(SUBSTITUTE(A2;"adenoma";"")))/LEN("adenoma") to find the frequency of the word adenoma. However in the same text there is also a mention of No polyps or adenoma, this results in a false addition of one adenoma. I tried getting the amount of no adenomas by replacing "adenoma" with "No* adenoma" and subtracting it from the adenoma frequency column. But this adjusted formula would not count the phrase: No polyps or adenoma.

    Any tips on how to solve this?

    Thanks!
    Attached Files Attached Files
    Last edited by losc; 10-05-2021 at 06:43 AM.

  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
    81,247

    Re: Discerning between partial text and frequency counting

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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
    Registered User
    Join Date
    10-05-2021
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    10

    Re: Discerning between partial text and frequency counting

    Thanks! I made a simple small sample document due to the database being confidential

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Discerning between partial text and frequency counting

    b2=SUMPRODUCT(ISNUMBER(SEARCH("adenoma",TRIM(MID(SUBSTITUTE($A2,":",REPT(" ",LEN($A2))),(ROW($A$1:$A$10)-1)*LEN($A2),LEN($A2)))))+0)
    c2=SUMPRODUCT(ISNUMBER(SEARCH("no*adenoma",TRIM(MID(SUBSTITUTE($A2,":",REPT(" ",LEN($A2))),(ROW($A$1:$A$10)-1)*LEN($A2),LEN($A2)))))+0)
    d2=b2-c2
    try above formula
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Registered User
    Join Date
    10-05-2021
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    10

    Re: Discerning between partial text and frequency counting

    Quote Originally Posted by samba_ravi View Post
    b2=SUMPRODUCT(ISNUMBER(SEARCH("adenoma",TRIM(MID(SUBSTITUTE($A2,":",REPT(" ",LEN($A2))),(ROW($A$1:$A$10)-1)*LEN($A2),LEN($A2)))))+0)
    c2=SUMPRODUCT(ISNUMBER(SEARCH("no*adenoma",TRIM(MID(SUBSTITUTE($A2,":",REPT(" ",LEN($A2))),(ROW($A$1:$A$10)-1)*LEN($A2),LEN($A2)))))+0)
    d2=b2-c2
    try above formula
    Thank you it seems to work! I'll try it in the actual database to see if it works there
    Last edited by losc; 10-05-2021 at 07:50 AM.

+ 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. Replies: 3
    Last Post: 04-17-2020, 03:43 PM
  2. [SOLVED] Frequency & Counting instances of specific text
    By moneypennie21 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-24-2020, 10:03 AM
  3. [SOLVED] Please help on COUNTIF Partial text, partial text/words also contained in other texts
    By maria.h in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2020, 10:18 PM
  4. Counting Cells if a value contains a partial test of text
    By Robbie8 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-15-2016, 05:40 PM
  5. [SOLVED] Partial Text Counting and calculating
    By Groovicles in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-31-2013, 10:17 AM
  6. [SOLVED] Counting frequency of Large Spreadsheets of text
    By wholemilk in forum Excel General
    Replies: 4
    Last Post: 07-22-2012, 11:29 AM
  7. Discerning Cell Formatting
    By excel328 in forum Excel General
    Replies: 6
    Last Post: 07-20-2010, 12:57 PM

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