+ Reply to Thread
Results 1 to 4 of 4

IF statement...

  1. #1
    Registered User
    Join Date
    01-10-2008
    Posts
    18

    IF statement...

    I have a colum where the listings may contain "A", "B" , "C", or "D". No numeric characters...well from there I want to state that if

    A1="A" then output is "Joe"
    A1="B" then ouput is "Joe"
    A1="C" then output is "Jane"
    A1="D" then output is "Dave"

    I was sure pretty sure that the statement was an IF function and may contain an ELSEIF but I can not seem a source to show me if I am right or wrong, nor can I produce the outcome. Could some please point me in the right direction?

    This is what I came up with

    =IF((AND(T2="PC", T2="MP", T2="AC", T2=FC)),"VSD","VSV")

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    For your example try

    =IF(A1="","",LOOKUP(A1,{"A","B","C","D"},{"Joe","Joe","Jane","Dave"}))
    or set up a table and use vlookup if you have a lot of conditions

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    For the sample you gave, the following IF formula can make it too

    Please Login or Register  to view this content.
    I need your support to add reputations if my solution works.


  4. #4
    Registered User
    Join Date
    01-10-2008
    Posts
    18
    Thank you! I used Sglife's for now, make sense for what I am doing now. I only have nine variables to consolidate into two categories. Though at some point in time I will have to make a table.

+ 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. Create statement from cells in workbook
    By Andy Stern in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-04-2008, 04:46 AM
  2. Nested IF Statement with Multiple Criteria
    By Hoopsah in forum Excel General
    Replies: 6
    Last Post: 07-23-2007, 10:01 AM
  3. With Statement Questions
    By OzTrekker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2007, 02:44 AM
  4. Nested IF Statement
    By Rache in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-23-2007, 01:32 PM
  5. advanced (i think) if statement help
    By ukrockhit in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-06-2006, 11:41 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