IF function

Hi,
I have the below formula but it is not working. Can you see where I'm going wrong?
=IF([(Fuel Expense) Fuel Type]@row="Unleaded Petrol (£0.25 per mile)","0.25",IF([(Fuel Expense) Fuel Type]@row="Diesel (£0.45 per mile)",0.45",IF([(Fuel Expense) Fuel Type]@row="Electricity (£0.10 per mile)","0.10")))
Column B needs to show a decimal version of the value that is presented in Column A ((Fuel Expense) Fuel Type)
Thanks,
Ahmet
Best Answer
-
I think you're just missing one set of " before the 0.45. Try this:
=IF([(Fuel Expense) Fuel Type]@row="Unleaded Petrol (£0.25 per mile)","0.25",IF([(Fuel Expense) Fuel Type]@row="Diesel (£0.45 per mile)","0.45",IF([(Fuel Expense) Fuel Type]@row="Electricity (£0.10 per mile)","0.10")))
Answers
-
Good afternoon Ahmet!
When you say it is not working, are you receiving a specific error message in the cell? Or are you getting other values than what you are looking for?
-
Hi Hayley,
The error message I get is #UNPARSEABLE
Thanks for taking a look...
-
I think you're just missing one set of " before the 0.45. Try this:
=IF([(Fuel Expense) Fuel Type]@row="Unleaded Petrol (£0.25 per mile)","0.25",IF([(Fuel Expense) Fuel Type]@row="Diesel (£0.45 per mile)","0.45",IF([(Fuel Expense) Fuel Type]@row="Electricity (£0.10 per mile)","0.10")))
-
Hi David,
Yes I knew there was something missing in the formula - thanks for spotting it :)
All the best,
Ahmet
-
No problem. Glad it's working.
Help Article Resources
Categories
Check out the Formula Handbook template!