Add column IF greater than AND ...

petiteshiraz

Board Regular
Joined
May 16, 2005
Messages
145
I want to add up the values for an entire column (column D) only if the value entered exceeds $15,000 – but I want to add ONLY the portion of the value in excess of $15,000.

For example, if column D had two entries, one for $17,000 and the other for $8,000 – I would want my result to be $2,000.

How do I write this formula?
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I want to add up the values for an entire column (column D) only if the value entered exceeds $15,000 – but I want to add ONLY the portion of the value in excess of $15,000.

For example, if column D had two entries, one for $17,000 and the other for $8,000 – I would want my result to be $2,000.

How do I write this formula?

I recommend adding a helper column in E and use the following:

Excel Workbook
DEF
21700020002000
38000-7000
Sheet1
Excel 2010
Cell Formulas
RangeFormula
E2=D2-15000
E3=D3-15000
F2=SUMIF(E2:E3,">0",E2:E3)



HTH, Ed
 
Upvote 0
I know someone will come up with a single formula but the simple way to achieve this is in column E

place the formula =If(D?>15000,D?-15000,"")

? being the starting row number then copy down, this will give you all the individual amounts over 15000, you can then add them at the bottom of the column
 
Upvote 0
Unfortunately, the helper colum won't work because I have to do this many many times for several columns.

I really need a single formula to get it done for the whole column.
 
Upvote 0
Another option
Code:
Sub test()
Dim lr As Long, r As Long
lr = Range("D" & Rows.Count).End(xlUp).Row
    a = 0
    For r = lr To 1 Step -1
        If Range("D" & r).Value > 15000 Then a = a + Range("D" & r).Value - 15000
    Next r
MsgBox "The total is " & a
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,158
Members
452,892
Latest member
yadavagiri

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