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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!