View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default IF statements - 26 combinations

change the array in the match portion of your equation and check that you
absolute cell references and relative cell references where appropriate

=VLOOKUP($A1,$F$2:$K$7,MATCH($B2,$F$1:$K$1,0),0)

"Rajula" wrote:

Hi,

I set up my matrix like this.
Col F Col G Col H Col I Col J Col K

V W X Y Z
A 1 2 3 4 5
B 2 4 6 8 10
C 3 6 9 12 15
D 4 8 12 16 20
E 5 10 15 20 25

In Col A & Col B i gave the values & in column C i entered the formula
below. But it doesnt work. Sorry..

Col A Col B Col C
A V 1
B V 2

I used the formula like this =VLOOKUP(A2,F2:K7,MATCH(B2,G3,0),0)

Regards
Rajula

"bj" wrote:

in this case with a 5 by 5 matrix

use a set of 6 by 6 cells
A11:F16 for example
set
A12="A"
A13= "B"
...
B11="V"
C11="W"
...

"Rajula" wrote:

Hi,

Yes there are 25 combi..
BTW how do i set up a range? Can you be bit more clearer?

"bj" wrote:

I think you mean 25 combos (5 squared)
if C1 is 1 through 25
one possibilty is
Set up a range
with A1 values in the first column and B1 values in the first row
and the c1 values at the intersections
=vlookup(A1,Range,match(B1,first_row,0),0)


"Rajula" wrote:

I have to incorporate this in a IF statement or whatever is simple. Does
anybody have a simple solution for this?

Cell A1 can have 5 values A,B,C,D or E
Cell B2 can have 5 values V, W, X, Y or Z

Value of Cell C1 is dependent on A1 & B1

ie IF A1 = A & B1 = V, then C1 = 1
If A1 = A & B1 = W then C1 = 2
If A1 = A & B1 = X then C1 = 3 & so on.... THere are 26 combinations. What
is a easy way of writing this formula

Kind regards