SOLVED

SWITCH function

Copper Contributor

I'm using Excel 2016 does anyone know why the SWITCH function isn't available? Is there any other function I can use instead?

8 Replies

@majormajor87 

SWITCH is available in Excel 2019 and later.

You can use IFS instead. For example

=SWITCH(A1,1,"one",2,"two",3,"three","none")

can be replaced with

=IFS(A1=1,"one",A1=2,"two",A1=3,"three",TRUE,"none")

IFS also isn't available on this version of excel?
What can I replace SWITCH and IFS with to make this formula work?
=IF(type<>"",SWITCH(type,"W",1,"SW",2,"T",3,"M",4),-1

If I
best response confirmed by majormajor87 (Copper Contributor)
Solution

@majormajor87 

Oops, sorry.

 

=IF(type="","",IF(type="W",1,IF(type="SW",2,IF(type="T",3,IF(type="M",4,-1)))))

 

Or use a LOOKUP or VLOOKUP formula.

This also didn't work. It said there are too many arguments? I'm really struggling :(

Could this be because the cells already have complicated conditional formatting arguments already? I'm following a guide but without SWITCH or an equivalent all my hours of work will be useless

@majormajor87 

It should work. Are you sure you copied it correctly?

S1431.png

yes it worked thank you so much for your help I really appreciate it  @Hans Vogelaar 

1 best response

Accepted Solutions
best response confirmed by majormajor87 (Copper Contributor)
Solution

@majormajor87 

Oops, sorry.

 

=IF(type="","",IF(type="W",1,IF(type="SW",2,IF(type="T",3,IF(type="M",4,-1)))))

 

Or use a LOOKUP or VLOOKUP formula.

View solution in original post