Forum Discussion
Creating an automatic fee calculator based on formulas
You are describing a situation with multiple moving parts here. It would be good to break them apart and deal with them in sequence rather than trying verbally to describe the whole mess.
Let me suggest you start with the varying pay tables, Tables 1 and 2, day and night, and make that into a single table. And don't use color to differentiate; use a code of some kind. The color can be derived from the code, but Excel is far more facile at reading and interpreting codes--and then applying color--than it is at going in reverse...seeing color and knowing what it means. For you as a human, presuming you're not color blind, there's no difference....but we're asking Excel to do the work.
So that single table would look something like this:
| Situation | DayNight | Rate |
| 1 | D | 20 |
| 1 | N | 35 |
| 2 | D | 15 |
| 2 | N | 30 |
I'm going to leave that for now and ask that you confirm that this makes sense.
Second, though, what do the entries in the red and blue cells mean? 03/abr etc. What does the "abr" refer to? Are there other codes that could appear?
In general, it's not a good idea to mix numeric and alpha characters in a single cell, especially if (as I think is the case) you're expecting mathematical calculations to be made based on the numbers. So if these are simply codes, that's fine, but if that means "3 hours ...." and the hours are going to be multiplied by the appropriate rate, then you'll need to find a different way to register that.
Let's leave aside for the moment the sequence of casting workers and just try to figure out how this pay process is toadministered.