# Conditional Statements

Hi Folks,

I’m sure this is easy but I am stuck trying to figure out a formula that will return a different number based on step count.
Here’s what I want:

if #ZSC#<=4900,0
if #ZSC#>4900&&#ZSC<=6700,1
if #ZSC#>6700&&#ZSC<=8500,2
if #ZSC#>8500&&#ZSC<=10000,3
if #ZSC#>10000&&#ZSC<=11300,4
if #ZSC#>11300&&#ZSC<=13000,5

I thought about uploading pictures of the numbers but was wondering if a formula could do it.

Thanks!

Amy Beryl

Should just be

\$#ZSC#<=4900?0: \$
and
\$#ZSC#>4900?0:\$\$#ZSC#<=6700?1:0\$

1 Like

Are the 2 parts you showed above placed on the same element or on 2 separate elements?

If its on the same element, what is the conjunction or joiner? What replaces the “and”?

its up to you either way would work but i would just make one long code like this but i dont know how to test it lol

\$#ZSC#<4900?0:\$\$#ZSC#<6700?1:\$\$#ZSC#<8500?2:\$\$#ZSC#<10000?3:\$\$#ZSC#<11300?4:\$\$#ZSC#<13000?5:0\$

1 Like

Do the ranges have to be exactly the numbers you chose? If not you could slightly adjust them to fit on a straight line. In which case the following would give you around the same result

``````\$#ZSC#<5070?0:(floor(0.0006253736*#ZSC#-3.170054))\$
``````

This would give you divisions at

5070 -v- 4900
6669 -v- 6700
8268 -v- 8500
9867 -v- 10000
11466 -v- 11300
13065 -v- 13000

Hi Amy,

Its sort of a combination of what they both said which is correct:

\$#ZSC#<=4900?0:\$\$#ZSC#>4900&&#ZSC<=6700?1:\$\$#ZSC#>6700&&#ZSC<=8500?2:\$ AND continue with the rest…

Enjoy~Sirhc

1 Like