# Modifying Previous Formula

#### glerwell

##### Well-known Member
Hi

I need help modifying a previous formula that I have.

Here's the formula:

=IF(K10="W",IF(M10="W",H10*J10,0),IF(M10="W",O10+P10,IF(M10="P",P10,0)))

I want to add the following into the formula:

if K10="W-DH" then the sum is (H10/2)*J10,10

I've tried adding this to formula but its just telling me I have too many arguments.

Any ideas guys

Thanks

### Excel Facts

Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

#### iggydarsa

##### Well-known Member
are you looking for something like this?

=IF(K10="W",IF(M10="W",H10*J10,0),IF(M10="W",O10+P10,IF(M10="P",P10,IF(K10="W-DH",(H10/2)*J10,0))))

#### glerwell

##### Well-known Member
thanks that works but not to the condition that i want it to. Maybe I explain it from the begining.

K10 can have the values "W", "EW 1/4" & "EW 1/5" and M10 the values "W", "W-DH", "P","P-DH" & "L".

IK10 is "W" and M10 is "W" i want the sum (H10*J10) but if M10 is "W-DH" i want the sum ((H10*.5)*J10) with "L" leaving 0.

If K10 is "EW 1/4" or "EW 1/5" and M10 is "W" i want to sum (O10+P10) but if "P" is in M10 then i just want the value of P10 and again "L" leaving 0.

If K10 is "EW 1/4" or "EW 1/5" but M10 is "W-DH" then i want the sum (Q10+R10) but if "DH-P" is in M10 then I want to return the value of R10 with "L" leaving 0.

I hope this is more clear.

Thanks

Replies
15
Views
316
Replies
20
Views
762
Replies
9
Views
453
Replies
6
Views
252
Replies
1
Views
223

1,181,055
Messages
5,927,863
Members
436,573
Latest member
CMR237

### 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.

### Which adblocker are you using?

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

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