Results 1 to 6 of 6

Counting Multiple Occurrences of Text in a Cell

Threaded View

  1. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Counting Multiple Occurrences of Text in a Cell

    With
    A1: containing text.....e.g. AbcdefgAhijklmAnopqrstAuvwxyAz
    B1: a character to find...e.g. A

    This regular formula returns the position of the last occurrence of that character
     
    C1: =FIND("|",SUBSTITUTE(A1,"A","|",LEN(A1)-LEN(SUBSTITUTE(A1,"A",""))))
    In the above example, the formula returns: 29

    Note: That formula is case-sensitive...so if A1 contains lower case a's, they would be ignored.
    If you need it to NOT be case-sensitive...try this:
    C1: =FIND("|",SUBSTITUTE(UPPER(A1),B1,"|",LEN(A1)-LEN(SUBSTITUTE(A1,"A",""))))


    Is that something you can work with?
    Last edited by Ron Coderre; 04-30-2011 at 03:13 PM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

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