Forum Discussion

LucasAssis's avatar
LucasAssis
Copper Contributor
Jan 12, 2022
Solved

IFS Function

Hello, Good night,   I'm trying to create a if situation, there's multiple PVC sockets, and for example a 90º knee, the person will choose the size of the socket and will receive the value automati...
  • mtarler's avatar
    Jan 13, 2022
    The format of IFS() is condition1, output1, condition2, output2, etc... so you would need:
    =IFS(C3=15;1,1;C3=20;1,2;C3=25;1,5;....)
    OR you can use the SWITCH() function which works almost exactly the way you tried:
    =SWITCH(C3;15;1,1;20;1,2;25;1,5;32;2;40;3,2;50;3,4;60;3,7;75;3,9;100;4,3;125;4,9;150;5,6)
    OR alternatively you could create a lookup table in your document and then use VLOOKUP() or XLOOKUP(). This alternative is particularly good if you have this formula in many location and maybe 1 day you change 1 of those values.

Resources