Forum Discussion
GeorgieAnne
Jul 06, 2026Iron Contributor
Can anyone help me with this SWITCH function
Hello Everyone, This SWITCH function is used to produce a number that then I can use to sort workers and their functions. =SWITCH(TRUE, IF(AND(ISNUMBER(J2)=TRUE,M2="Working")=TRUE,5,0), I...
Riny_van_Eekelen
Jul 06, 2026Platinum Contributor
Remove all the IF functions, the =TRUE parts and the ",0" at the end of each statement. Make sure that the parenthases match up tough.
A formula that gives results (don't know if they are correct though) is this one:
=SWITCH(TRUE,
AND(ISNUMBER(J2),M2="Working"),5,
AND(ISNUMBER(K2),M2="Working"),500,
AND(ISNUMBER(J2),M2="Special Project"),15,
AND(ISNUMBER(K2),M2="Special Project"),515,
AND(ISNUMBER(J2),M2="Stand By"),20,
AND(ISNUMBER(K2),M2="Stand By"),520,
AND(ISNUMBER(J2),M2="Special Project UFN"),25,
AND(ISNUMBER(K2),M2="Special Project UFN"),525,
50
)