• 412K Members
• 2,931 Online
• 467K 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

# 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
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies