+ Reply to Thread
Results 1 to 7 of 7

Finding # of Occurrences in various cells.

  1. #1
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    Finding # of Occurrences in various cells.

    I have attached a spreadsheet which has various codes typed into a number of cells.

    I am trying to find the number of occrrences for certain codes that appear in these cells. The problem is that the codes in the cells look as follows:

    cell A13: 272.4;789.01;787.23;401.9;274.9;2725
    cell A18: 530.3;787.20;041.86;578.1;455.6;565.0


    That appears in one cell itself and the codes are separated by a semicolon.

    What I need to do is find the number of occrrences that a certain code occurs. For example, how many times does 787.20 (from above) occur in the entire list from cell A5:A164?

    It is difficult to siphon out certain numbers because they are all lumped together and separated by the semicolon.

    I've attached the spreadsheet for ease of understanding.

    I've tried to use the =countif function but it won't pick up everything it should because of the semicolon problem and the numbers being lumped together.

    Any help is much appreciated!
    Attached Files Attached Files
    Last edited by The Exceller; 08-13-2010 at 10:07 AM. Reason: [SOLVED]
    The Exceller
    If I helped you, please add to my reputation by clicking on the scale by my name in this post.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Finding # of Occurrences in various cells.

    Would attached help?
    The formula are array formula, they should be entered with Ctrl+Shift+Enter
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    Re: Finding # of Occurrences in various cells.

    Nice Job arthurbr. I believe that does it. I didn't know it would need to be a CSE fomula like that. My only question is if it's really picking up all the numbers with the semicolon in place. It looks like it is but it would nice to hear your confirmation or thoughts on that.

    Thanks again

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Finding # of Occurrences in various cells.

    The best way too see the formula at work is to try Tools - Formula auditing - Evaluate formula
    The array formula returns an array of 0's and 1's depending on the fact that FIND returns a number or not, and sums the 0's and 1's
    And it will return a number when it finds the string independently of the semi colon's presence

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Finding # of Occurrences in various cells.

    This might help prove Arthurs' formulae
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Finding # of Occurrences in various cells.

    You can also avoid an array formula using

    =SUMPRODUCT(--ISNUMBER(FIND(D2,$A$5:$A$164)))

  7. #7
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    87

    Re: Finding # of Occurrences in various cells.

    Okay!, I'm going to go ahead and say it like this...

    ...you dudes are awesome! Nice work for sure! This is really helpful and again I've learned something new. Thanks a lot.

+ Reply to Thread

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