Peter Davison
Active Member
- Joined
- Jun 4, 2020
- Messages
- 435
- Office Version
- 365
- Platform
- Windows
I am using MROUND to do a simple rounding up or down on a variable cell "T6" amount.
This is fine until the rest of the formula delivers a result of Zero.
My variable cell in "T6" is 0.25.
So based on MROUND it will result at Zero.
What I want is for everything to round up and down unless the result is 0 then I want it to round up to the variable in "T6" 0.25.
This is my original formula -
MROUND(IF($AG$6="N",IF($S12="","",IF($AF12=$AF$9,$S$10*$Y12,IF($AF12=$AF$10,"",IF($S$10*$Y12<$AC12,$AC12,IF($S$10*$Y12>$AD12,$AD12,IF($S$10*$Y12<$T$6,$T$6,$S$10*$Y12)))))),IF($S12="","",IF($AF12=$AF$9,$S$10*$Y12,IF($AF12=$AF$10,"",IF($S$10*$Y12<$AC12,$AC12,IF($S$10*$Y12>$AD12,$AD12,IF($S$10*$Y12<$T$6,$T$6,$S$10*$Y12))))))*$AH12),$T$6)
I can achieve what I want by adding an - If the above formula =0, cell "T6", or repeat the above.
but it just doubles the size of the formula.
I wondered if there was an easier way.
Any thoughts would be great.
This is fine until the rest of the formula delivers a result of Zero.
My variable cell in "T6" is 0.25.
So based on MROUND it will result at Zero.
What I want is for everything to round up and down unless the result is 0 then I want it to round up to the variable in "T6" 0.25.
This is my original formula -
MROUND(IF($AG$6="N",IF($S12="","",IF($AF12=$AF$9,$S$10*$Y12,IF($AF12=$AF$10,"",IF($S$10*$Y12<$AC12,$AC12,IF($S$10*$Y12>$AD12,$AD12,IF($S$10*$Y12<$T$6,$T$6,$S$10*$Y12)))))),IF($S12="","",IF($AF12=$AF$9,$S$10*$Y12,IF($AF12=$AF$10,"",IF($S$10*$Y12<$AC12,$AC12,IF($S$10*$Y12>$AD12,$AD12,IF($S$10*$Y12<$T$6,$T$6,$S$10*$Y12))))))*$AH12),$T$6)
I can achieve what I want by adding an - If the above formula =0, cell "T6", or repeat the above.
but it just doubles the size of the formula.
I wondered if there was an easier way.
Any thoughts would be great.