Hi,
I'm trying to create a count of occurrences based on conditions, using the table below as an example. The conditions for a count of 1 are that columns "Parameter" AND "Location" both repeat together in the next row OR anywhere else in the 2 columns. The output table would have the same column data present in the original table with 3 added columns of "Count" , "Tool 1", "Tool 2" (number of tools can increase to 5).

Output for this table would be as follows. Since row 3 and 4 repeat per the 2 column condition (parameter and location) that would be a count of 1, then it repeats again with the same conditions that would be the 2nd count for a total of 2. The row to be displayed would depend on the first one of 3 rows by order of date. Finally the Tool column would populate by order of date as well (ie. Tool 1 (or E) came in first at 1:10PM , then Tool 2 (or F) came in at 2:10PM) etc..
