+ Reply to Thread
Results 1 to 5 of 5

Text Function--Specifically search and return a specific value

  1. #1
    Registered User
    Join Date
    05-19-2015
    Location
    Washington DC
    MS-Off Ver
    2013
    Posts
    2

    Text Function--Specifically search and return a specific value

    Hi,

    I am have alot of data that i am trying to analyze and I need help with a text function. I am trying to search a text string in a cell for specific values and return a specific value. An example of the text strings would be:

    Oct 2011 Travel Supp
    Sep 2012 Travel
    Oct 2012 Travel Sup

    I am trying to get a formula to search these text strings for the word "travel" and then return a value of "travel invoice". Is this possible? Any help would be greatly appreciated.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Text Function--Specifically search and return a specific value

    One way...

    =IF(COUNTIF(A1,"*Travel*"),"Travel Invoice","")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Text Function--Specifically search and return a specific value

    Maybe:

    =IF(ISNUMBER(SEARCH("Travel", A1)), "Travel Invoice", "")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    05-19-2015
    Location
    Washington DC
    MS-Off Ver
    2013
    Posts
    2

    Re: Text Function--Specifically search and return a specific value

    Thanks!! Would it be possible to add multiple searches. For example if I had the same thread but also had some other types of invoices:

    Oct 2011 Travel Supp
    Sept 2013 Visas
    Sep 2012 Travel
    Oct Visas
    Oct 2012 Travel Sup

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Text Function--Specifically search and return a specific value

    Try this one

    =LOOKUP(10^308,SEARCH({"travel","visa"},A1),{"Travel Invoice","Visa Invoice"})

    Row\Col
    A
    B
    1
    Oct 2011 Travel Supp Travel Invoice
    2
    Sep 2012 Travel Travel Invoice
    3
    Oct 2012 Travel Sup Travel Invoice
    4
    Oct 2011 Travel Supp Travel Invoice
    5
    Sept 2013 Visas Visa Invoice
    6
    Sep 2012 Travel Travel Invoice
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. Search for multiple texts in cell, return specific text
    By mariur89 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 11-24-2014, 06:43 PM
  2. [SOLVED] VBA to search cell containing specific text and return common value
    By hate0lif3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-30-2014, 09:41 AM
  3. [SOLVED] search for specific text in a file and return a value to a cell based on the results
    By JJGF in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-03-2013, 07:00 PM
  4. [SOLVED] if the rows containing specific text are hidden, delete a specifically named ole object
    By Willardio in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-24-2012, 02:36 PM
  5. Replies: 4
    Last Post: 06-29-2006, 07:10 PM

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