dynamic rounding formula

tomishere

New Member
Joined
Nov 18, 2019
Messages
3
Hello,

Been trying to figure this and I feel I am close but there also may be an easier way to do this..

Pretty much if the summed value's two digits after the decimal is greater or equal to .90 and less than or equal to .99 then round up else keep the number as is. So 1.91 should be 2 and 1.89 should be 1.89, 2.96 should be 3 and 2.67 should be 2.67.

This is what I have
=IF(AND(LEFT(SUM(A2,B2),2)&RIGHT(SUM(A2,B2),2)>(LEFT(SUM(A2,B2),2)&90),RIGHT(SUM(A2,B2),2)<(LEFT(SUM(A2,B2),2)&99)),ROUNDUP(LEFT(SUM(A2,B2),2)&RIGHT(SUM(A2,B2),2),2),LEFT(SUM(A2,B2),2)&RIGHT(SUM(A2,B2),1))

I am trying to make this dynamic so my logic is get the right two digits of the summed value and concatenate 90 and 99 when doing the >=, <= and using the roundup function if it meets the criteria else just display the summed value. If there is an easier way to do this please show me the way
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Edit: I misread your formula but does it do what you want if you replace A1 in the formula below with SUM(A1, A2)?

Does this do what you want?

Book1
AB
11.912
21.891.89
32.93
41212
53.013.01
62.993
Round above 0.9
Cell Formulas
RangeFormula
B1:B6B1=IF(MOD(A1,1)>=0.9,ROUNDUP(A1,0),A1)
 
Upvote 0
Hi Peter,

This is what I needed. Yep, just replacing the A1 with the sum did it. Really appreciate it, thank you.

- Thomas
 
Upvote 0
Hi Peter,

This is what I needed. Yep, just replacing the A1 with the sum did it. Really appreciate it, thank you.

- Thomas
You are very welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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