+ Reply to Thread
Results 1 to 3 of 3

Trouble with IF or LOOKUP string

  1. #1
    Registered User
    Join Date
    02-05-2015
    Location
    Virginia
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    2

    Trouble with IF or LOOKUP string

    Hi, I'm rather new to Excel and am having trouble writing a string correctly for this scenario:

    If E2 input value = 2, 35, 82, 266, 268, 278, 281, 373, 645, 646 or 744 output PM, else if E2 is another value then:
    If F2 input value =D, output AMI, else if F2 is another value then:
    If H2 input value is 1-6, output PM
    If H2 input value is 7-16, output TS
    If H2 input value is 30-39, output SQ
    If H2 input value =40, output CP
    If H2 input value is 50-59, output EP
    If H2 input value is 60-69, output BR

    Like this:
    E F G H I (OUTPUT)
    35 C DF 7 PM
    82 C DF 10 PM
    511 D DF 7 AMI
    627 C DF 50 EP

    Thank you very much for any help!

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Trouble with IF or LOOKUP string

    Hi,

    Does this get you anywhere close?

    =IF(OR(E2={2,35,82,266,268,278,281,373,645,646,744}),"PM",IF(F2="D","AMI",LOOKUP(H2,{1,7,17,30,40,41,50,60,70},{"PM","TS","","SQ","CP","","EP","BR"})))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    02-05-2015
    Location
    Virginia
    MS-Off Ver
    Microsoft Office Professional Plus 2010
    Posts
    2

    Re: Trouble with IF or LOOKUP string

    This worked perfectly. Thank you so much!

    Do you have any online tutorials you recommend?

+ 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. Having trouble with IF AND OR string
    By lc130 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-26-2014, 06:21 PM
  2. [SOLVED] Trouble testing if a string contains numbers only
    By TC1980 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-27-2013, 10:03 AM
  3. [SOLVED] Trouble pulling a string of numbers due to it being a decimal...
    By DSully82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-16-2013, 11:05 PM
  4. [SOLVED] Trouble extracting data from a string
    By par71 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2012, 06:04 PM
  5. Having trouble using a string as the name for an array
    By construct in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2012, 10:38 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