S
shriil
Hi
I have a date column where the fields are incremented by 10 minutes
starting from 9:00 Hrs to 15:30 Hrs. The column dates are indicated as
below
A
sep -23 9:00
9:10
9:20
9:30
9:40
......
.....
15:20
15:30
sep-24 9:00
9:10
....
The second condition that needs to be sufficed is if the next date
falls on a Saturday, then the date shall jump to the next Monday 9:00
and then continue to be incremented by 10 minutes. This would mean
that after sep -24 : 15:30 the next date shall have to be sep-27:
9:00, as Sep -24 is a Friday and the next date becomes Saturday, so it
should jump to sep-27 monday.
I have more or less made a formula for say, if sep -24 : 15:30 is in
Cell (A17) then the formula in Column (A18) shall be
=IF(TIME(HOUR(A17),MINUTE(A17),SECOND(A17))<>TIME(15,30,0),A17+TIME(0,10,0),IF(WEEKDAY(A17+TIME(17,30,0))=7,A17+TIME(17,30,0)+TIME(23,0,0)+TIME(1,0,0)+TIME(23,0,0)+TIME(1,0,0),A17+TIME(17,30,0)))
The formula is then dragged down for all the cells.
The formula is working well but somehow its doesnt seem to a very
smart formula and is cumbersome.
Can the above logic be inducted in a better formula?
Thanks
I have a date column where the fields are incremented by 10 minutes
starting from 9:00 Hrs to 15:30 Hrs. The column dates are indicated as
below
A
sep -23 9:00
9:10
9:20
9:30
9:40
......
.....
15:20
15:30
sep-24 9:00
9:10
....
The second condition that needs to be sufficed is if the next date
falls on a Saturday, then the date shall jump to the next Monday 9:00
and then continue to be incremented by 10 minutes. This would mean
that after sep -24 : 15:30 the next date shall have to be sep-27:
9:00, as Sep -24 is a Friday and the next date becomes Saturday, so it
should jump to sep-27 monday.
I have more or less made a formula for say, if sep -24 : 15:30 is in
Cell (A17) then the formula in Column (A18) shall be
=IF(TIME(HOUR(A17),MINUTE(A17),SECOND(A17))<>TIME(15,30,0),A17+TIME(0,10,0),IF(WEEKDAY(A17+TIME(17,30,0))=7,A17+TIME(17,30,0)+TIME(23,0,0)+TIME(1,0,0)+TIME(23,0,0)+TIME(1,0,0),A17+TIME(17,30,0)))
The formula is then dragged down for all the cells.
The formula is working well but somehow its doesnt seem to a very
smart formula and is cumbersome.
Can the above logic be inducted in a better formula?
Thanks