+ Reply to Thread
Results 1 to 7 of 7

IF, search some text with OR function??

  1. #1
    Registered User
    Join Date
    07-19-2006
    Posts
    6

    IF, search some text with OR function??

    I have countries listed in a column I want to search the column for Japan, China, Brazil, and apply the region of "Asia" or South America"

    This is what I have so far but I am thinking and i can clean it up with "OR" function but I can figure out the order.

    =IF(ISNUMBER(SEARCH("Belgium",C2:C99)),"Europe",IF(ISNUMBER(SEARCH("Auckland",C2:C99)),"Asia",IF(ISNUMBER(SEARCH("Germany",C2:C99)),"Europe",IF(ISNUMBER(SEARCH("Arg",C2:C99)),"South America",IF(ISNUMBER(SEARCH("Australia",C2:C99)),"Asia",)))))

    Any Recommendations?

  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: IF, search some text with OR function??

    If you have "many" countries how about creating a table and using a lookup function?

    http://contextures.com/xlFunctions02.html
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    07-19-2006
    Posts
    6

    Re: IF, search some text with OR function??

    Yes sir, I am trying to apply the region of each into a new cell. so the function looks for the country then applies the region. Then I create a pivot table to make my pie chart to tell me what percentage of shipments go to each region.

  4. #4
    Registered User
    Join Date
    07-19-2006
    Posts
    6

    Re: IF, search some text with OR function??

    Okay I like that VLOOKUP...

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: IF, search some text with OR function??

    So what did you come up with?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: IF, search some text with OR function??

    Good deal. Thanks for the feedback!

  7. #7
    Registered User
    Join Date
    07-19-2006
    Posts
    6

    Re: IF, search some text with OR function??

    So I created a pivot table for the all the countries which consolidated them in one table. The manually assigned the region in a separate column. One my main worksheet I used the VLOOKUP for all the countries and used the pivot table to assign the region. Probably a more efficient way but I just learned how to use Vlookup!

+ 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 Function using 2 text boxes
    By sara101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2014, 10:19 AM
  2. IF(count(search) Function not working when search from text from a cell
    By joshnathan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-09-2013, 05:13 AM
  3. [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
  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. Use a function to search for text ?
    By ChasHutch in forum Excel General
    Replies: 2
    Last Post: 09-19-2007, 12:03 PM
  6. 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
  7. Search function (text or numerical)
    By marciac in forum Excel General
    Replies: 4
    Last Post: 07-14-2006, 10:00 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