Hours and Minutes calculation

Hi,
I am attempting to automate a calculation that will support the conversion of hours to minutes. I have a form the employees enter the amount of time spent with one initiative.
The formula I attempted returns #INVALID VALUE. The value 90 is a manual entry.
Last formula: =TIME([Time Allocation]@row) /60
Time Allocation: Dropdown List (Values):
15m
30m
45m
1hr
1.5hr
2hr
3hr
4hr
5hr
Ultimately, I will create a report that calculates Dawn's total hours per month.
Example: Dawn calculated 240 minutes during the month of July.
Thank you!
Best Answer
-
@Adarian Searcy
Try this.=IFERROR(IF(CONTAINS("hr", [Time Allocation]@row), VALUE(SUBSTITUTE([Time Allocation]@row, "hr", "")) * 60, VALUE(SUBSTITUTE([Time Allocation]@row, "m", ""))), "")
This formula searches for an hr in the time allocation column then returns the value multiplied by 60, If hr is not there it will return the value of min. If neither is in the column it returns a blank.
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
Answers
-
@Adarian Searcy
Try this.=IFERROR(IF(CONTAINS("hr", [Time Allocation]@row), VALUE(SUBSTITUTE([Time Allocation]@row, "hr", "")) * 60, VALUE(SUBSTITUTE([Time Allocation]@row, "m", ""))), "")
This formula searches for an hr in the time allocation column then returns the value multiplied by 60, If hr is not there it will return the value of min. If neither is in the column it returns a blank.
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
-
Thank you, @Mark.poole this function worked as intended.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.9K Get Help
- 429 Global Discussions
- 147 Industry Talk
- 487 Announcements
- 5.2K Ideas & Feature Requests
- 86 Brandfolder
- 151 Just for fun
- 74 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!