formula for dates

  • Thread starter Thread starter ghynes
  • Start date Start date
G

ghynes

hello..

im looking for formula which will give me an output related to th
date.

heres what i am looking for.
i have a list of work shifts in column A, and start date in column
and end date in column C. i need an output on a diff cell to tell m
the shift thats working on the present day.

SHIFTC 3/27/2007 7:00 3/27/2007 19:00
SHIFTD 3/27/2007 19:00 3/28/2007 7:00
SHIFTC 3/28/2007 7:00 3/28/2007 19:00
SHIFTB 3/28/2007 19:00 3/29/2007 7:00
SHIFTA 3/29/2007 7:00 3/29/2007 19:00
SHIFTB 3/29/2007 19:00 3/30/2007 7:00
SHIFTA 3/30/2007 7:00 3/30/2007 19:00
SHIFTD 3/30/2007 19:00 3/31/2007 7:00

the cell with the function would output SHIFTC as today is 3/27/200
12:08 and then would change to SHIFTD when the time would change t
3/27/2007 19:00.

can you help
 
I don't think that you need the second column of dates/times

With the shift s in column A and the dates/times in column B try:

=INDEX(A1:A8,SUM(--(B1:B8<NOW())))

Array enters with Crtl + Shift + Enter

Or

=INDEX(A1:A8,SUMPRODUCT(--(B1:B8<NOW())))

Nurmally entered.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
Back
Top