• 396K Members
• 3,306 Online
• 432K Conversations

New Contributor

# Converting time into a corresponding number

I was hoping someone could help me with this question. I need to convert a time sting (not sure if that's the right terminology) into a corresponding number. So in cell A1 (time) the input would be 6:00am-8:00am and the corresponding number would be in cell B1 (units) 8. Every 15 minutes is equal to 1 unit. If anyone can give me any answers to this question it would be greatly appreciated.

2 Replies
Highlighted

# Re: Converting time into a corresponding number

Hi,

I suggest using this formula:

`=(MID(A2,SEARCH("-",A2)+1,LEN(A2)-SEARCH("-",A2)-2)-LEFT(A2,SEARCH("-",A2)-3))*24*4`

Hope that helps

# Re: Converting time into a corresponding number

Thanks @Haytham Amairah I really appreciate it.

Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies