Is there an excel function that calculate results from two cells depending on which cell is entered before the other?
We have a site in which workers do two operations, let's call them A&B.
For each operation, there is a different policy for payment for overtime.
let's say the output for the two operations will be shown in Cells A&B, and calculation of the payment for overtime will be shown in cell C.
So, if the cell A is entered before cell B, if there is an overtime, the payment policy in cell C will be calculated as per operation B policy, as it is the one causing the overtime. and vice versa.
If you are open to using vba, then you could use the
Worksheet_Change
event to store the "Date/Time Modified" on a second (hidden) worksheet, like so:This would then let you include your "time sheet" in the formula, like this:
(Obviously, that is just a rough example, and doesn't take into account things like when only 1 of the cells has had data entered, or clearing dates when you delete data)