Number to time conversion, or lookup?

sparkyrick

New Member
Joined
Dec 2, 2005
Messages
3
I'm trying to automate the data entered into my time card. If I have the number 10 in cell B15, sheet two, I would like 4:00PM automatically entered in cell E5, sheet one. And the data in B15, sheet two, would have varied data with a range like 10=4:00PM, 9.5=3:30PM, 9=3:00pm, 8.5=2:30PM, 8=2:00PM, ect...Any ideas?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Welcome to the board.

Try E5 =TIMEVALUE("6:00")+Sheet2!B15/24

Format E5 as h:mm AM/PM
 
Upvote 0
This will work for a cell formatted to "general". I believe the prior post requires a cell to be formatted to time (depends on your needs).

=(TIME(6+(B15),0+(-60*(+B15-(ROUND(B15,0.1)))),0))
 
Upvote 0
It works!

Hey Oaktree, Thanks for the welcome and thanks for your answer to my question. I don't know what that formula is doing, but it works exactly like I wanted. Thanks again.
 
Upvote 0
Excel calculates time as fractions of a day. Since your example matches 10 to 4:00PM, the 10 represents 10 hours after 6:00AM.

So, the formula starts with 6:00AM, then adds 10 hours (10/24 of a day) to that value.

HTH.
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,816
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top