# How to add contents of another cell to formula

#### Harold R.

##### Board Regular
I have the following formula =(MAX(0,SUMIF(K29,">40")-40))*1.5 I need to add cell X20 to K29. I have tried
=(MAX(0,SUMIF(K29,X20),">40"))-40))*1.5
=(MAX(0,SUMIF(K29+X20),">40"))-40))*1.5
=(MAX(0,SUMIF(K29,X20)">40"))-40))*1.5
=(MAX(0,SUMIF(K29+X20)">40"))-40))*1.5
But it doesn't work. What am I doing wrong?

### Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

#### mikerickson

##### MrExcel MVP
SUMIF(K29,">40")-40

=IF(K29>40,K29,0)-40

=either -40 or K29-40

So, MAX(0,SUMIF(K29,">40")-40)

=MAX(0,K29-40)

Does =MAX(0,K29+X20-40) give you the result you want?

#### facethegod

##### Well-known Member
Does this give you your expected result..?

=MAX((K20+X29)-40,0)*1.5

#### Harold R.

##### Board Regular
SUMIF(K29,">40")-40

=IF(K29>40,K29,0)-40

=either -40 or K29-40

So, MAX(0,SUMIF(K29,">40")-40)

=MAX(0,K29-40)

Does =MAX(0,K29+X20-40) give you the result you want?

Yes it does if I add *1.5 Thanks that is much simpler.

Replies
1
Views
1K
Replies
16
Views
555
Replies
1
Views
174
Replies
2
Views
423
Replies
9
Views
273

1,191,118
Messages
5,984,749
Members
439,907
Latest member
Kayfabe

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