+ Reply to Thread
Results 1 to 10 of 10

IF(count(search) Function not working when search from text from a cell

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    IF(count(search) Function not working when search from text from a cell

    Hello,
    I'm trying to get this formula to work but i cant get it to

    =IF(COUNT(SEARCH(H2,I2, 'Data Sheet'!C3)), 1, "")

    If i replace H2 and I2 with the words i want to serach it works but it wont work with the cell names there.

    IF this can be ammended is there a way to do it with multiple searches
    For example some times i might want to search for the contents of cell H2, I2 and J2 and other times H2, I2, J2 and K2. Can i just keep all these values in the formula and fill them in as needed or will the blanks cause me problems?

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF(count(search) Function not working when search from text from a cell

    search.xlsx
    Try like this
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: IF(count(search) Function not working when search from text from a cell

    Hi thanks for the response and an example. Although i'm a little confused. at the moment irespective of whats in the list i get a 0 value. even if the terms dont match up. What should i be receiving?

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF(count(search) Function not working when search from text from a cell

    If the term do not match you have 0- I assume that's correct?(no matching terms)
    What would you like to recive?
    State your outcome or post a sample workbook

  5. #5
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: IF(count(search) Function not working when search from text from a cell

    Example Book.xls

    If you look at this book using your formula
    Basically in Cell C3 on search it should have a 1 i assume to say the search terms have been found. If you look at the coresponding cells in Data Sheet you can see that C3 does have both search terms in it.
    Thanks for the help

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF(count(search) Function not working when search from text from a cell

    Replace your list in Name Manger with this
    =OFFSET(Search!$H$2,,,,COUNTA(Search!$H$2:$M$2))
    and confirm the formula in C6 with Control+Shift+Enter
    To return "" instead of 0
    =IF(SUM(--ISNUMBER(SEARCH(List, 'Data Sheet'!C3)))=0,"",SUM(--ISNUMBER(SEARCH(List, 'Data Sheet'!C3))))
    or use Custom Format
    0;-0;;@

  7. #7
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: IF(count(search) Function not working when search from text from a cell

    Thank you very much,
    The number that appears in the cell, what does it represent?

  8. #8
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF(count(search) Function not working when search from text from a cell

    Which number?

    Please add reputation if you are happy with the solution

  9. #9
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: IF(count(search) Function not working when search from text from a cell

    Sorry should have clarified the number that comes up in cel c6. it seems to go down from 6 the smaller the number of matched search terms

  10. #10
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF(count(search) Function not working when search from text from a cell

    Example Book.xls
    Not sure but you do not have any data yet in the Data tab.
    Please see attached

+ 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. [SOLVED] Search function to search if worksheet contains specified text
    By mougiasm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2013, 02:50 PM
  2. [SOLVED] search for text, then search for previous text, replace 1st text including number from 2nd
    By kldailey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2012, 05:23 PM
  3. Function to Search COUNT
    By scubab in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-13-2011, 01:37 PM
  4. Search Text In A Cell + If Function
    By katsuya in forum Excel General
    Replies: 6
    Last Post: 06-27-2011, 07:44 AM
  5. Function in a cell to search for a text
    By Lilly in forum Excel General
    Replies: 6
    Last Post: 04-24-2007, 08:42 AM

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