# Switch function

Is there a way to do a formula with the switch function? For example this is the formula I use in airtable that calculates platform fees for me when I sell stuff on different marketplaces…
SWITCH({Platform},
‘Depop’,{Item total} * .129 + .30,
‘Poshmark’, IF({Item total} < 15,2.95, IF({Item total} >= 15, {Item total} * .2),
‘Grailed’,{Item total} * .09,
‘Mercari’,{Item total} * .129 + .30,
‘Tradesy’, IF({Item total} < 50,7.50, IF({Item total}>= 50, {Item total} * .198)) )

Also, is there a way to format line breaks in a concatenate formula? Once again here’s an example of a formula I have to put descriptions together for me…
{Features} & ‘\n’ & "Condition: " & {Condition} & ‘\n’ & "Material: " & {Material} & ‘\n’ & "Color: " & {Color} & ‘\n’ & "Size: " & {Size} & ‘\n’ & ‘\n’ & {Measurements}
Thanks

Hi,

It seems nesting conditional formulas with AND() could take place of the SWITCH function.

We do also have string formulas, you could simply calculate the strings like A1+CHAR(10)+A2, which CHAR(10) returns line break.

Thanks!

1 Like