Converting time into a corresponding number

Copper Contributor

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

Hi,

 

I suggest using this formula:

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

Convert time to a special units.png

 

Hope that helps

 

@Chobbs323 

Thanks @Haytham Amairah I really appreciate it.