Skip to main content
Solved

Help with a conditional formula

  • March 6, 2024
  • 2 replies
  • 22 views

Forum|alt.badge.img+9

Can anyone tell me where I'm going wrong with this formula?

 

SWITCH( {HS-LA %},
"15%", ({GBP Amount}-{HS-LA Commission}),
"10%", ({GBP Amount}-{HS-LA Commission}-{HS-LA Commission}),
)

Or suggest another way to achieve it - I've tried a few IF options too but can't get that to work either. 

For context, I'm a literary agent and depending on the type of deal I do I either take 15% or 10% commission. Where I take 10% a co-agent will have also taken 10% but that's not necessary for me to track, other than that when I'm working out the author's overall income I need to make sure I know they didn't get it (hence trying to take away my commission twice in those instances here). 

The closest I got to it working (ie, it actually ran something instead of refusing to save because of an error), I got words back instead of numbers and what I need is numbers. 

Best answer by TheTimeSavingCo

Try removing the trailing comma in your formula:

SWITCH( {HS-LA %}, "15%", ({GBP Amount}-{HS-LA Commission}), "10%", ({GBP Amount}-{HS-LA Commission}-{HS-LA Commission}) )

2 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Try removing the trailing comma in your formula:

SWITCH( {HS-LA %}, "15%", ({GBP Amount}-{HS-LA Commission}), "10%", ({GBP Amount}-{HS-LA Commission}-{HS-LA Commission}) )


Forum|alt.badge.img+9
  • Author
  • Known Participant
  • March 7, 2024

Ah! Thank you!