Excel Changing Variables

consider that i have data in excel (B1=2, B2=5, B3=7, ... ) and ( A1=2 , A2=3)

i want to make a formula in C1 = B(A1) + B(A2) whitch result in 12 for this case

i tried B$A1 and B[A1] and B"A1" and ... all other things, not any chance can you help me

hello consider that i have data in excel (B1=2, B2=5, B3=7, ... ) and ( A1=2 , A2=3)

i want to make a formula in C1 = B(A1) + B(A2) whitch result in 12 for this case

i tried B$A1 and B[A1] and B"A1" and ... all other things, not any chance can you help me


With EXCEL-365 try-

=SUM(INDEX(B1:B3,A1:A2))

enter image description here