Get time from populated cells

~TaC~

New Member
Joined
Dec 16, 2016
Messages
15
Hi,

New to the forum and novice in Excel.

I have a sheet where I can fill in the times that colleagues work each day, this varies from day to day.

7-88-99-1010-1111-1212-11-22-33-44-5StartFinish
****
****

<tbody>
</tbody>

What I would like is for the start and finish times to be auto populated showing first row start=09:00 and finish=13:00, second row start=11 and finish=15:00

I can't upload a picture of what I have done but the cells don't fill with * they are colour filled depending on hours worked.

How is this possible, I was hoping to use formula but now wondering if I need to use macro.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi, welcome to the board :)

If those are cells with a number and anything else in them (a minus sign or minus and another number), then they are no longer values, they are text, and you cannot (simply) run calcs on text.

Also, if you are working with time, then it is always best if you use actual time entries...7:00 and 19:00 or 07:00 AM and 7:00 PM rather than just 7
 
Upvote 0
Thanks for the welcome,

I'm assuming I can't upload an image to show what I'm doing so I will try to describe better.

Say row C has cells filled 5-6, 6-7, 7-8, 8-9, 9-10, 10,11, 11-12, 12-1.... 9-10, 10-11, representing 5am to 11pm, say column C to T.
Row D, E, F etc will have the hours staff have worked, these are colour filled to show at work.
At the end of each staff hours, column U and V. I have columns labelled Start, Finish.
I would like to auto populate the start and finish time in to these columns.

Does this make better sense of my issue? I have no idea how to work with cells formatted as time.

Thanks for your quick reply Ford

Regards
Tez
 
Upvote 0
Sorry to be a downer (again)

Colour is cosmetic formatting, not data, and formulas work on data :(
Is there some other way that you could indicate worked for the period - like with an X or a 1? we could count the X's...
A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
1​
Name5-66-77-88-99-1010-1111-1212-13Total
2​
aaXXXX
4​
3​
bb
1​
1​
1​
1​
4​
4​
cc
1​
1​
1​
1​
1​
1​
1​
1​
8​
5​
ddXXXXXX
6​
J2=COUNTA(B2:I2)
copied down
 
Upvote 0
Your not being a downer lol, took me ages to work out what I did.

I forgot to say that I used conditional formatting to colour cells filled with "1", so they do have a value. I have used COUNTA to count number of hours worked.

What I am looking to do is fill other columns with the actual start finish times. So if they start at 7am and finish at 3pm, have 07:00 in one column and 15:00 in another.

In essence, I have done what you have displayed but then I want column K+L which would be start+finish.
 
Upvote 0
OK, sounds do-able. Can I assume there will be no gaps btw start and end (unlike my sample)?
 
Last edited:
Upvote 0
This should work, even if there are gaps...
A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
K​
L​
1​
Name5-66-77-88-99-1010-1111-1212-13TotalStartEnd
2​
aa
1​
1​
1​
3​
5-68-9
3​
bb
1​
1​
1​
3​
7-810-11
4​
cc
1​
1​
1​
1​
1​
1​
1​
7​
5-611-12
5​
dd
1​
1​
1​
1​
1​
1​
6​
5-610-11
K2=INDEX($B$1:$I$1,MATCH(TRUE,INDEX(($B2:$I2<>0),0),0))
L2=INDEX($B$1:$H$1,MATCH(0,B2:H2,-1))
both copied down
 
Upvote 0
ABCDEFGHIJKL
1Name5-66-77-88-99-1010-1111-1212-1TotalStartFinish
2aa1111408.0012.00
3bb111310.0013.00
4cc11111505.0010.00
5dd111307.0010.00

<tbody>
</tbody>
 
Upvote 0
Looking at your formulas, this wouldn't work.

If B2+C2 are populated then K2 should show 5-7
L3 should be 9-11 and so on

What I'm looking to achieve is the example I posted, I think I may need to get use to using time format?
 
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,476
Members
448,967
Latest member
visheshkotha

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