Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

If formula

jrook20
6 - Meteoroid

Hi all,

 

I am looking to create a formula for an if statement I am using in excel. The excel formula is:

 

=if(G2=“Dog”,if(Q2<=4,0,if(AND(Q2>=5,Q2<=15),1,if(AND(Q2>=16,Q2<=30),6.25,if(AND(Q2>=31,Q2<=45,9.375,if(Q2>=46,12.5))))),if(Q2<=5,1,12.5))

 

Column G is “Animal”

Column Q is “Days until Dog Available”

 

Thanks

1 REPLY 1
binuacs
21 - Polaris

@jrook20 

IF [G] = "Dog" THEN
    IF [Q] <= 4 THEN 0
    ELSEIF [Q] >= 5 AND [Q] <= 15 THEN 1
    ELSEIF [Q] >= 16 AND [Q] <= 30 THEN 6.25
    ELSEIF [Q] >= 31 AND [Q] <= 45 THEN 9.375
    ELSEIF [Q] >= 46 THEN 12.5
    ENDIF
ELSE
    IF [Q] <= 5 THEN 1
    ELSE 12.5
    ENDIF
ENDIF
Labels
Top Solution Authors