I have a very complex Excel formula that I need to create, but I keep getting stuck. I have data that looks like this:
Date ID Focal Time Condition
08/22/2014 FJ 1 7:52:00 T
08/22/2014 FJ 1 7:52:00 T
08/22/2014 FJ 1 7:52:00 T
08/22/2014 RJ 1 8:52:00 T
08/22/2014 FJ 2 9:52:00 T
08/22/2014 FJ 2 9:52:00 T
08/22/2014 FJ 2 9:52:00 T
08/22/2014 FJ 2 9:52:00 T
08/22/2014 FJ 3 10:52:00 T
08/22/2014 FJ 3 10:52:00 T
08/22/2014 FJ 1 11:32:00 C
08/22/2014 FJ 1 11:32:00 C
08/22/2014 RJ 2 11:52:00 T
08/22/2014 RJ 2 11:52:00 T
08/22/2014 FJ 4 10:52:00 T
08/22/2014 FJ 4 10:52:00 T
08/22/2014 MD 1 12:52:00 T
08/22/2014 RJ 3 13:52:00 T
08/22/2014 RJ 3 13:52:00 T
08/22/2014 FJ 2 14:52:00 C
08/23/2014 FJ 1 7:52:00 T
08/23/2014 FJ 1 7:52:00 T
08/23/2014 RJ 1 8:52:00 T
08/23/2014 FJ 1 9:52:00 C
I need the Focal number column to autopopulate according to the following rules:
- The first entry will always be "1".
- Each ID should have the same Focal number when their Date, Time, and Condition are the same.
- When only the time changes, the number should be sequentially listed.
- When the condition changes, the number should start over at 1, and then these should be sequential when the time changes.
- If the condition changes to an ID that has previously experienced it, the sequential number should pick up when it left off.
- Also, when the ID changes, the number should start over at one.
- Finally, a new date will start this process for all IDs all over again.