• 585K Members
• 12.9K Online
• 709K Conversations

Highlighted
New Contributor

# excel if calculations

can someone help with the correct formula for the following;

if (B3 = 1 then M8), if (B3 = 2 then N8), if (B3 = 3 then O8)

many thanks

6 Replies

# Re: excel if calculations

try:

=IFS(B3=1,M8,B3=2,N8,B3=3,O8)

Highlighted

# Re: excel if calculations

=IF(B3=1,M8,IF(B3=2,N8,O8))

Thanks

Tauqeer

Highlighted

# Re: excel if calculations

It could be

``=CHOOSE(B3,M8,N8,O8)``

or

``=INDEX(M8:O8,B3)``
Highlighted

# Re: excel if calculations

Thank you @Sergei Baklan

CHOOSE works great

Highlighted

# Re: excel if calculations

Thank you @finaly

I have 20 rows i need to apply this too, when I drag the calculation down the rows it obviously changes the B3 to B4 and so on, I need the B3 input to remain constant where the M N & O can ascend, any suggestions?

Highlighted

# Re: excel if calculations

In any of above formulas use absolute reference for B3 and relative one for others, like

``=CHOOSE(\$B\$3,\$M8,\$N8,\$O8)``

Related Conversations
Expansion and interpolation of dated dated
Happy-Hoppy in Excel on
0 Replies
average formula
teacher_rich in Excel on
1 Replies
Excel 365 - Extracting non-empty values from a row of values?
AC626 in Excel on
4 Replies
Excel ALT+ENTER - did this go away?
MashPotatoes in Excel on
7 Replies
excel se cierra
garciamuriel in Excel on
0 Replies
Excel help
Gerardjoseph2 in Excel on
1 Replies