Conditional formula. Calculate based on value in another column

RodneyC

Active Member
Joined
Nov 4, 2021
Messages
278
Office Version
  1. 2016
Platform
  1. Windows
I have four different calculations I could use, which one to use is based on a value on another column.

I'm looking for a formula to put in column L.

Let's say all cells in column K have a value of either 1, 2, 3, or 4. If the value in K is 1, then the formula in L should look at the value in G and should multiple that value by the value in CalcF4 (*Calc!F4) If the value in K is 2 then CalcF4 will change to CalcF5, CalcF6 for 3 and CalcF7 for 4.

Thanks in advance.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try

Excel Formula:
=IF(K2=1,G2*Calc!F4,IF(K2=2,G2*Calc!F5,IF(K2=3,G2*Calc!F6,G2*Calc!F7)))
 
Upvote 0
RodneyC, Good morning.

The beauty of Excel is that you can get the same result in different ways.

Excel Formula:
=G2 * CHOOSE(K2, Calc!$F$4, Calc!$F$5, Calc!$F$6, Calc!$F$7)

Have a nice day!
 
Upvote 0
RodneyC, Good morning.

The beauty of Excel is that you can get the same result in different ways.

Excel Formula:
=G2 * CHOOSE(K2, Calc!$F$4, Calc!$F$5, Calc!$F$6, Calc!$F$7)

Have a nice day!

The Beauty of Excel ... AND the Beauty of Belo Horizonte ... (y):)⚽
 
Upvote 0
Brilliant. Yes, one of the many things I love about Excel is there is more than one way to skin this cat. Thank you all. I've got it working.
 
Upvote 0
RodneyC,

Thanks for the feedback.

I'm happy to have been able to help you along with the other colleagues here.
 
Upvote 0

Forum statistics

Threads
1,214,635
Messages
6,120,660
Members
448,975
Latest member
sweeberry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top