+ Reply to Thread
Results 1 to 5 of 5

how to use a wildcard with an IF formula to search for text in a cell

  1. #1
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    how to use a wildcard with an IF formula to search for text in a cell

    I have attached a sample sheet.
    What i have done so far is working but it needs a tweak to get it to do exactly as I want.
    I have put a formula in column E that adds the number from column J when it sees the word 'utilities' in column D.
    My problem, which I hadn't anticipated is that if any other words appears in column D with the word 'utilities' for example
    'Plot 1 utilities' it doesn't add the number in column J. I need it to recognise and change when it sees a range of names from 'Plot 1 utilities' through to ''Plot 11 utilities. I don't know if it's a wildcard I need or not, I have tried putting * and ? in the formula but haven't got anything to work yet
    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: how to use a wildcard with an IF formula to search for text in a cell

    Put this in E6:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    then copy down.

    Hope this helps.

    Pete

    EDIT: You do have to spell utilities correctly in D10.
    Last edited by Pete_UK; 10-23-2012 at 06:54 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    Re: how to use a wildcard with an IF formula to search for text in a cell

    Thanks Pete, works like a charm. I had already noticed that the word 'utilities' had to be spelt correctly for it to work, because I had spelt it wrong in another cell and it would work. Thanks for your help, it's a shame it can't allow for the odd typo though

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: how to use a wildcard with an IF formula to search for text in a cell

    Yes, but think how many combinations of mis-spelt UTILITIES there could be. If you could guarantee always to type the first 4 characters correctly, then you could just have "util" instead of "utilities" in the SEARCH function - case is not important.

    Hope this helps.

    Pete

  5. #5
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    Re: how to use a wildcard with an IF formula to search for text in a cell

    Thanks again Pete, I've changed it to 'util' now. I think it will be easier to get the first four letters right than the whole word.
    I appreciate your help and can now mark this as solved. Thanks again

+ 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