+ Reply to Thread
Results 1 to 3 of 3

Search for several texts and return a spesific text

  1. #1
    Registered User
    Join Date
    11-24-2014
    Location
    norway
    MS-Off Ver
    2010
    Posts
    37

    Search for several texts and return a spesific text

    Ok, this is a great challange! Honor to the one who solves this one

    I'm making a budget.
    I want to sort my spendings into categories. My spendings are downloaded as a spreadsheet from my bank. It looks like this:

    Details Sum Category
    VISA Mc Donalds -130,00
    138766 Statoil -640,00
    76234 TAXI 20141127 -357,00
    23454 BurgerKing -130,00

    The categories in this example would be:

    lunch
    gas

    Now, I want to search for multiple strings in the A-column and return the correct category for each spending. F.x: I will search for texts like "donalds","burger","oil". If no match is found, the return value should be an empty string. The result should look like:

    Details Sum Category
    VISA Mc Donalds -130,00 lunch
    138766 Statoil -640,00 gas
    76234 TAXI 20141127 -357,00
    23454 BurgerKing -130,00 lunch

    I have tried
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    , but I have only been successful with searching for one string. Using macro is an option, but I want to try solving this one without use of macro.

    I'll be greatful for all the help you can provide!

  2. #2
    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: Search for several texts and return a spesific text

    Try this formula with this layout

    in C2 and copy down

    =IFERROR(LOOKUP(25^25,SEARCH($D$2:$D$4,A2),$E$2:$E$4),"")

    Row\Col
    A
    B
    C
    D
    E
    1
    Details Sum Category Look Ups Returns
    2
    VISA Mc Donalds -130,00 Lunch Mc Donalds Lunch
    3
    138766 Statoil -640,00 Gas Statoil Gas
    4
    76234 TAXI 20141127 -357,00 BurgerKing Lunch
    5
    23454 BurgerKing -130,00 Lunch
    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

  3. #3
    Registered User
    Join Date
    11-24-2014
    Location
    norway
    MS-Off Ver
    2010
    Posts
    37

    Re: Search for several texts and return a spesific text

    Are you kidding me!? Thanks a lot AlKey! That was exactly what I needed

    ..but what is the purpose of the "25^25"?

+ 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. Replies: 10
    Last Post: 09-18-2014, 09:36 AM
  3. Search the text in 3rd cell by using texts in 2 cells
    By Shinaj in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-09-2014, 08:08 AM
  4. Replies: 1
    Last Post: 12-18-2012, 04:09 AM
  5. find for any of some search texts within a text
    By xirx in forum Excel General
    Replies: 2
    Last Post: 06-15-2005, 01:05 PM

Tags for this Thread

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