Forum Discussion

elaina0813's avatar
elaina0813
Copper Contributor
Dec 04, 2019
Solved

trying to create a calculator using incremental rounding

Hello, I am trying to create a calculator for incremental rounding.  For example if I have a cell with a value I was wondering if i can get excel to recognize the value and place it/round it in one...
  • ChrisMendoza's avatar
    Dec 04, 2019

    elaina0813 -

     

    Will something like below work for you?

    //Formatted
    =SWITCH(
      TRUE,
      B3 < 5, 0,
      B3 <= 50, MROUND(B3,5),
      B3 > 50, MROUND(B3,10),
      -1
    )
    //Unformatted
    =SWITCH(TRUE,B3<5,0,B3<=50,MROUND(B3,5),B3>50,MROUND(B3,10),-1)

     

     

Resources