+ Reply to Thread
Results 1 to 12 of 12

Countif

  1. #1
    Registered User
    Join Date
    03-29-2006
    Posts
    21

    Countif

    Hi All,

    I have the follwing formula that will count the number of times a word appears in a range, it is as follows:

    Please Login or Register  to view this content.
    How do i get it to search for text within a cell??

    Regards
    Gunny

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try this,

    =COUNTIF(A:A,"*")
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by gunny1979
    Hi All,

    I have the follwing formula that will count the number of times a word appears in a range, it is as follows:

    Please Login or Register  to view this content.
    How do i get it to search for text within a cell??

    Regards
    if cell A1 contains 122333 and you want to count that how many times 3 appears in cell A1, try this

    =LEN(A1)-LEN(SUBSTITUTE(A1,3,""))

    hope this is what you asked for.

  4. #4
    Registered User
    Join Date
    03-29-2006
    Posts
    21
    Sorry I dont think I explained myslef clearly I was in a bit of rush.

    I meant how do I count the number times a word that is placed in a cell appears in a range.

    Thanks

  5. #5
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    for your information
    COUNTIF does not count the characters within a cell.

    Regards.

  6. #6
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by gunny1979
    Sorry I dont think I explained myslef clearly I was in a bit of rush.

    I meant how do I count the number times a word that is placed in a cell appears in a range.

    Thanks
    sorry
    like this

    =COUNTIF(A1:A50,"="&B1)

  7. #7
    Registered User
    Join Date
    03-29-2006
    Posts
    21
    Hi Starguy,

    Thanks for your help

    Unfortunatley this will only count the number times it appears exactly!

    for intance people could type in info, information etc.

    the other code
    Please Login or Register  to view this content.
    Counted the instances of info for me, but Ihad to type info into the formula
    is there a way of doing this for a referenced cell, so users can just type the word they are looking for into a cell??

    Thanks

  8. #8
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by gunny1979
    Hi Starguy,

    Thanks for your help

    Unfortunatley this will only count the number times it appears exactly!

    for intance people could type in info, information etc.

    the other code
    Please Login or Register  to view this content.
    Counted the instances of info for me, but Ihad to type info into the formula
    is there a way of doing this for a referenced cell, so users can just type the word they are looking for into a cell??

    Thanks
    have you tried formula I posted above
    i-e
    =COUNTIF(A1:A50,"="&B1)
    or
    =COUNTIF(A1:A50,B1)

  9. #9
    Registered User
    Join Date
    03-29-2006
    Posts
    21
    Hi Starguy,

    I have yes but it only counts the occurences of when it has been typed exactly as it is in the reference cell.

    Regards

  10. #10
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi Gunny,

    If you have cells A1:A4

    A1 = information
    A2 = inform
    A3 = form
    A4 = info

    Try this in B1

    =COUNTIF(A1:A4,"info*") result 3. Is that what you are after?

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

  12. #12
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    =countif(a1:a50,"*"&b1&"*")

+ 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