Multiply ifs

Giancar

Board Regular
Joined
Nov 29, 2017
Messages
52
Hi everyone,

I was checking previous posts but I am not able to amend the formula in the way I wished.
So I have following table

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]1st week[/TD]
[TD]1000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2nd week[/TD]
[TD]2000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3rd week[/TD]
[TD]5000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

In C1 I need a formula that multiply B1*0.5 if A1is "1st week", if A1 is 2nd week multiply B1*0.35 and if A1 is "3rd week", multiply B1*0.15

Thank you in advance
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
maybe...

=B2*CHOOSE(MATCH(A2,{"1st Week","2nd Week","3rd Week"},0),0.5,0.35,0.15)
 
Upvote 0
Assuming col A will always contain one of those values,

[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td]1st week[/td][td]
1000​
[/td][td="bgcolor:#CCFFCC"]
500​
[/td][td="bgcolor:#CCFFCC"]C1: =B1*LOOKUP(A1, {"1st week","2nd week","3rd week"}, {0.5,0.35,0.15})[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]2nd week[/td][td]
2000​
[/td][td="bgcolor:#CCFFCC"]
700​
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
3​
[/td][td]3rd week[/td][td]
5000​
[/td][td="bgcolor:#CCFFCC"]
750​
[/td][td][/td][/tr]
[/table]


EDIT: I prefer Weazel's
 
Last edited:
Upvote 0
Well, my bad, both are working, but I have a problem when I drag down.
If I add the formula on specific cells is working, but if i Drag down it is not. What am I doing wrong?
Thx
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,051
Members
452,542
Latest member
Bricklin

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