SUM IF - Round up If - Round Down Else

lager1001

Board Regular
Joined
May 17, 2019
Messages
88
Hi all,

I need help building out a formula here.

If I have a column of data that I am performing a SUMIF on, I would like to incorporate a Rounding calculation to the SUMIF formula. If the sum of the data's decimal point is below .5, round down nearest whole number, if over .5 round up to nearest whole number. See below example. The first 7 lines associated with order number 588999072 should round down to 7. The line associated with order number 60354858 should round up to 2. Any ideas?

Order numberItem numberOptimal Shipping UnitsSUMIF
588999072HASU50298731.087.230090909
588999072MRKU47936891.057.230090909
588999072MRSU35506661.187.230090909
588999072MRSU37901900.677.230090909
588999072MSKU97518991.187.230090909
588999072SUDU87776971.007.230090909
588999072TRLU71300711.067.230090909
588999073MRKU31121630.350.346927273
588999075HASU44704991.051.052163636
588999076MRSU37008740.560.557036364
588999077UETU54422500.810.812490909
588999078TGHU96895361.071.072854545
65021489BMOU56300100.330.332272727
66688203FBLU01667350.510.506781818
60021495CRXU98407670.260.264272727
60354858TGHU91204101.621.623453555
60354876GATU86725040.547.283963636
60354876HLBU12848901.167.283963636
60354876HLBU22753621.037.283963636
60354876HLXU63602641.007.283963636
60354876TCNU10508191.057.283963636
60354876TCNU66972431.097.283963636
60354876UACU57586231.087.283963636
60354876UACU59456660.337.283963636

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
How about
=ROUND(SUMIF(A:A,A2,C:C),0)
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,748
Members
448,989
Latest member
mariah3

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