View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Flash in the Pan Flash in the Pan is offline
external usenet poster
 
Posts: 7
Default cell's reference value dependent on another cell's value

I have the following:
A B C
1 5 x y
2 7
3 9

whe
A1=5, A2=7, A3=9

B1=x
C1=y


I want the value in B1 to be dependent of the value in C1 such that:

If C1=1 then I want B1=A1 (or 5)
If C1=2 then I want B1 =A2 (or 7)
and
If C1=3 then I want B1 =A3 (or 9)

what code or formula do i put in B1 to get tis result?

Thanks

J