I suppose I owe an apology for the functions I posted yesterday. It was such a marvelous idea and it does seem to work. However, that is all it does - seem. I have failed to create an array formula that will look up incremental dates in a set range and tell me which, if any, of the dates was first found.
Meanwhile, for some one who professes to be less smart in things Excel than those who frequent these pages joeinck does appear to have had the better sense. So I took his advice and stuck with VBA.
You need to install this little procedure in the code module of the worksheet on which you want the action,
This procedure will check whenever a change is made in the worksheet whether it is relevant to the calculation of time. It will decide that it is relevant if the change occurred in one of the Start date or Hours columns AND the row of change has a number with a decimal in the Test column, 3 columns to the left from the Start Date column. Remember to save your workbook as macro-enabled now.
Next please insert a standard code module ("Module1" by default) and past this code into it.
At the top of the code you have a lot of Enums and Constants which are all set to match the worksheet Project that you posted. You can change those values in future if you modify your design. Note in particular that the 3 cells that make up a set, Start, Hours and End, are treated intentionally as independent units, meaning you don't need to keep them adjacent to each other.
I hope this will compensate for my errors of last night.
Bookmarks