+ Reply to Thread
Results 1 to 5 of 5

Help with Search Formula

Hybrid View

  1. #1
    Registered User
    Join Date
    02-28-2014
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    12

    Help with Search Formula

    Hello,

    I am looking to put together a formula that searches for a string of text and returns the following:

    IF SEARCH “X Rewards” returns “X Rewards”
    IF SEARCH “Gas Rewards” returns “Gas Rewards”
    IF SEARCH “% OFF” returns “% Off”
    IF SEARCH “0 Off” returns “Dollar Off”

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Help with Search Formula

    With this list in A1:A5
    There a X Rewards for you
    You have gas rewards waiting
    30% off is available
    This item is 0 off
    Bozo is a clown
    and this lookup list in F1:G4
    X Rewards      X Rewards
    Gas Rewards    Gas Rewards
    % OFF          % OFF
    0 Off          Dollar Off
    This regular formula, copied down, returns the referenced value for matching text
    B1: =IFERROR(LOOKUP(10^99,SEARCH($F$1:$F$4,A1),$G$1:$G$4),"No Match")
    For that data, these are the returned results:
    X Rewards
    Gas Rewards
    % OFF
    Dollar Off
    No Match
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help with Search Formula

    Reading your question, i think it would be.

    =a1

    but probably it is not that simple.

    in that case please add an excel file, without confidential information, or better information.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Search Formula

    Hi,

    Maybe

    Formula: copy to clipboard
    =IF(ISERROR(SEARCH("Rewards",A1)),IF(LEFT(A1,1)="0","Dollars Off",PROPER(A1)),A1)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,621

    Re: Help with Search Formula


+ 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] extend search formula to mutiple search for single a cell
    By lagiosman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-20-2014, 01:16 PM
  2. [SOLVED] How to ask formula to search for multiple values within one search?
    By Buzz57 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-04-2014, 11:14 PM
  3. Modify this Search Formula to search across a range of cells
    By zicitron in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-16-2013, 08:11 AM
  4. Formula to search, match value, search again, return SUM
    By Russ Fuquay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2013, 11:01 PM
  5. Replies: 5
    Last Post: 03-29-2012, 04:12 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