+ Reply to Thread
Results 1 to 2 of 2

IF function: Using text in logical_test with multiple variables and replacing with text

  1. #1
    Registered User
    Join Date
    11-25-2012
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    4

    IF function: Using text in logical_test with multiple variables and replacing with text

    Hi all,

    I really hope you guys will be able to help me - I'm new here and a bit of an excel newbie!

    I am trying to work out if the IF function can be formulated to take multiple queries.

    I have a database with 'Content' (A2) entries in the rows that I want to categorise into 'Department' (E2)

    What I'd like to do is a formula that basically gives me the following:

    E2=IF(A2="Olympics" or "London2012" or "Paralympics" or "#Energy2012", "Brand", "0")

    Is it possible to effectively have keyword groups within the function?

    Also, this content is being exported from Twitter so includes alot of @ and #, I noticed when typing @ in cells Excel rejects it. Is this going to cause a problems when sorting through the data?

    Thanks in advance
    Sarah

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: IF function: Using text in logical_test with multiple variables and replacing with tex

    in E2
    =IF(OR(A2="Olympics",A2="London2012",A2="Paralympics",A2="#Energy2012"),"Brand","0")

    ie, if A2 is Olympics or London2012 or paralympics or #Energy2012 then E2 will get set to Brand otherwise it will get set to 0 (text)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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