+ Reply to Thread
Results 1 to 2 of 2

Seeking Information Formula for specific logic

Hybrid View

sweeetk Seeking Information Formula... 11-21-2008, 05:49 PM
NBVC Something like this: ... 11-21-2008, 05:57 PM
  1. #1
    Registered User
    Join Date
    11-21-2008
    Location
    Laguna Niguel
    Posts
    1

    Seeking Information Formula for specific logic

    I am using Excel 2007.
    Is there anyone that could help me with the Excel formula below?

    I worked with it for about an hour last Wed. night….but I’m not sure how to do it.

    The logic is as follows:

    If G2 (generic cell) is not anyone of these “text,” then give the result “V.”
    If G2 (generic cell) is one of these “text,” then give the result “I.”
    If G2 (generic cell) is “T67,” then give the result “S.”

    Wrong formula….but this is the idea….
    =IF(G2={ "T50","T51", "T52","T53","T54","T55","T56","T57","T58","T59" }, "V") IF(G2=T67, "S") IF(G2=T99, "L") IF(G2=T60

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Something like this:

    =IF(OR(G2={"T50","T51","T52","T53","T54","T55","T56","T57","T58","T59"}),"V",IF(G2="T67","S",IF(G2=T99,"L",IF(G2=T60,""))))

    If you have multiple possibilities.. then enclose your first structure with the { } brackets as you did, in an OR() statement.

    The above formula is a working formula, but obviously you need to add some other elements.

    Note that you can only have 7 nested functions... If you exceed that, then you will possibly need another function or incorporate the use of a side table that lists the possibilities and the desired output in adjacent column, then use a Vlookup() function... e.g. =Vlookup(G2,X1:Z100,2,FALSE) where X1:Z100 is where the table is located.

    Another possibility is the Choose() function...

    e.g. =CHOOSE(RIGHT(G2,2)-49,"V","V","V","V","T","T")

    where you can have up to 29 values to choose from. The Right(G2,2) extract the 2 digits from G2 and subtracts 49, to get a number starting at 1 (that is what Choose function needs. So if result is 1, it retrieves the first value from the list after the condition).
    Last edited by NBVC; 11-21-2008 at 06:03 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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