Dec 13, 2024 06:21 AM
Hi,
I am hoping that someone might be able to help with a nested IF Statement I have a field that determines the size of an advert. I want another field to list the price for the advert based on the selection in the first column.
This is the If Statement I created, but something is not quite right because it always shows the value £0.00
Solved! Go to Solution.
Dec 13, 2024 08:08 AM
Hi,
In your example, error is '£0.00', in first line.
In common, it should be IF ( condition , _when condition is true_ , _when condition is false_ ) , but then you should substitute last argument and start next line right after _when condition is true_ ,
Anyway, your case has better and easier readable solution - use SWITCH
SWITCH({Advert Size},
'Full Size','£100.00',
'Half Size','£50.00',
'Quater Size','£25.00',
'£0.00')
Dec 13, 2024 08:08 AM
Hi,
In your example, error is '£0.00', in first line.
In common, it should be IF ( condition , _when condition is true_ , _when condition is false_ ) , but then you should substitute last argument and start next line right after _when condition is true_ ,
Anyway, your case has better and easier readable solution - use SWITCH
SWITCH({Advert Size},
'Full Size','£100.00',
'Half Size','£50.00',
'Quater Size','£25.00',
'£0.00')
Dec 13, 2024 08:23 AM
Hi Alexey_Gusev,
Ooooo I like this. Thanks. I had tried without the £0.00 on the first line but it still didn't work. Now I guess that's likley because the order of the formula is back to front.
However, your {SWITCH} Solution is far more elegant. Thanks for the help.
S