IF AND Function problems

D

DVV

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.
 
V

Vito

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.
 
Top