+ Reply to Thread
Results 1 to 5 of 5

IF AND Function problems

  1. #1
    Registered User
    Join Date
    01-17-2006
    Posts
    3

    IF AND Function problems

    I'm having a problem with a formula I'm trying to create. I have 7 different tests, lets call them A-G; that you can receive a 1,2,3, or 4 on. I want to create a formula that will identify what test and what number was entered to kick back a value. So A-1 would have a different value than A-4, likewise, D-2 would be different than B-2. I'm not sure if this is possible to create a function of this length. If this would be to long, are there any alternatives? Thanks in advance for the help.

  2. #2
    Registered User
    Join Date
    01-17-2006
    Posts
    3
    I take it nobody knows

  3. #3
    Registered User
    Join Date
    04-23-2004
    Posts
    28

    why IF & AND

    If I inderstood your problem correctly you should use VLookup function.

  4. #4
    Forum Contributor
    Join Date
    11-29-2005
    Posts
    142
    Possibly you can create a table on the side showing the possible combinations in one column and the desired respective result in another and use a vlookup to retrieve the desired result.

    E.g.

    Table in J1:K12
    Code Result
    A1 A
    A2 B
    A3 C
    A4 D
    B1 E
    B2 F
    B3 G
    B4 H
    C1 I
    C2 J
    C3 K


    If I have these following entries, where A, B, C are the actual column headers and the 1, 2, 3 are entries made by the user.

    A B C
    1 2 3


    Then a formula to use can be:
    =VLOOKUP(LEFT(ADDRESS(1,COLUMN(A1),4),1)&A1,$J$1:$K$12,2,0)
    copied across the columns.

    Note: This formula assumes you start entering the data in A1. Change the cell ref in the Column() function and in the ref after the & symbol to match the column you enter data in. Also adjust lookup range to suit.

    This formula takes the letter of the column address and combines it with the number you type into the cell in the same column and then it looks up this combo in your table and retrieves the corresponding result.

    For the example above, the formula would return

    A F K


    Hope this helps.

  5. #5
    Registered User
    Join Date
    01-17-2006
    Posts
    3

    Thanks

    Thanks for the help, I will definetly give that a try.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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