Results 1 to 14 of 14

Excel 2007 : Constructing a formula that counts distinct words in a single cell

Threaded View

  1. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,677

    Re: Constructing a formula that counts distinct words in a single cell

    Quote Originally Posted by NBVC View Post
    Try:

    =COUNT(FIND(ROW(INDIRECT({"1:32"})),Jan!G2))

    Hold the CTRL and SHIFT keys down and then hit ENTER
    That won't work here because it won't differentiate between a single 1 and a 1 in 11, 21 or 31, so for this data

    6, 17, 25, 32

    you'll get a count of 9 because it will count 1, 2, 3, 5, 6, 7, 17, 25 and 32

    Assuming only numbers between 1 and 32 separated by comma+space with no extra characters at the start or end you could use this version

    =COUNT(FIND(" "&ROW(INDIRECT("1:32"))&","," "&Jan!G2&","))

    confirmed with CTRL+SHIFT+ENTER

    or to avoid CSE

    =SUMPRODUCT(ISNUMBER(FIND(" "&ROW(INDIRECT("1:32"))&","," "&Jan!G2&","))+0)
    Last edited by daddylonglegs; 01-20-2010 at 05:33 PM.

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