views:

21

answers:

1

I have a few cells that schedule a list of employees depending on a start time. (In this case, the start time is indicated by the cell named 'Time'.)

=CONCATENATE(TEXT(Time,"h:mm AM/PM")&" - "&TEXT(Time+TIME(10,30,0),"h:mm AM/PM"))

It works fine but now I want to implement a feature that will allow the user to specify how long the shift could be by entering the amount of hours into a cell. (In my worksheet I used a cell named DayShift)

What would I do to my Function in order to allow the addition of how long the shift is?

+2  A: 
=CONCATENATE(TEXT(Time,"h:mm AM/PM")&" - "&TEXT(Time+TIME(0,Hours*60,0),"h:mm AM/PM"))

Where Hours is the cell with the number of hours (ie, 10.5 for your current example).

Coldnorth
Thanks! This is exactly what I needed!
BioXhazard