martiniextradry
Board Regular
- Joined
- Mar 4, 2008
- Messages
- 73
I need to get a formula to read a table, similar to below, and tell me when a person's shift starts and ends. Here is a rough idea of it:
A B C D E F G H I
1 Name 4:00 4:30 5:00 5:30 6:00 6:30 7:00 7:30
2 Martin O A F F F F W
3 Kevin A F
That is a small section of it. The O means opening, the A is shift preparation, F means floor manager and W is one of many letters that say other jobs (this letter means very little). What I need it to do at first is just look for the first cell (and then one for the last too) with a value in it and put the value in row 1. So for the small example above it would need to produce:
A B C
1 Name Start Finish
2 Martin 4:00 7:30
3 Kevin 6:30 7:30
with B2 and B3 having the formula that works out the first cell with a value and C2 and C3 having the same formula but for the last cell with a value.
I tried with HLOOKUP but think I might be barking up the wrong tree.
PS It says 7:30 because they have a value in 7:00, so they will leave at 7:30 (the first blank cell)
PPS it doesn't need to understand what letter is what, I may add that at a later date.
HmmmPS it seems to have removed my spaces so you can't see how my cells line up
A B C D E F G H I
1 Name 4:00 4:30 5:00 5:30 6:00 6:30 7:00 7:30
2 Martin O A F F F F W
3 Kevin A F
That is a small section of it. The O means opening, the A is shift preparation, F means floor manager and W is one of many letters that say other jobs (this letter means very little). What I need it to do at first is just look for the first cell (and then one for the last too) with a value in it and put the value in row 1. So for the small example above it would need to produce:
A B C
1 Name Start Finish
2 Martin 4:00 7:30
3 Kevin 6:30 7:30
with B2 and B3 having the formula that works out the first cell with a value and C2 and C3 having the same formula but for the last cell with a value.
I tried with HLOOKUP but think I might be barking up the wrong tree.
PS It says 7:30 because they have a value in 7:00, so they will leave at 7:30 (the first blank cell)
PPS it doesn't need to understand what letter is what, I may add that at a later date.
HmmmPS it seems to have removed my spaces so you can't see how my cells line up