Conditionally Round Down?

Hey Guys! I’m trying to make myself another useful tool for D&D, but I’m fumbling on a very simple (presumably) formula.

All I need is for this number to round up generally, BUT if the result is less than 1, it needs to be rounded down instead. I’m really struggling, since I thought I had it, but the formula maker won’t let me use “CurrentValue” in the above formula, yet it says it can’t refer to the column “lvl 9” because It’s the column that I’m already referencing. Help! I tried using Filter, too, but I just can’t grasp it.

What I’m after- Previous Column’s number halved, rouded up- IF result is below 1, round down instead.

You should just put two separate rounding formulas in the if statement.

if( lvl9<1, roundup(lvl9), roundup(lvl8) )

Would that work?

Ah, no, sorry, I realize my second screenshot may be misleading- if the result is below 1, it needs to be rounded down, not up.

Also, the lvl 8 chip is how I’m getting the lvl 9 result (Each subsequent level is just the previous one halved, with the rounding rule), so it doesn’t need to be rounded up at this point either- I’m just using it to get the lvl 9 result. Also, it still won’t let me reference lvl 9 in the lvl 9 column, despite the fact that it also won’t let me use CurrentValue, either, and I’m not sure what I’m missing.

I’m a bit confused at what you’re trying to achieve. You are correct, you can’t reference the column within the column formula so it makes sense that you can’t reference column lvl 9 within it’s formula.

Is this the formula you’re going for?

Please share a dummy doc to get proper help, otherwise is just guess work based on vague or maybe improper explanation. You can find how to do it in here.

2 Likes