Hi!
I need a macro that can find multiple identical values in column A, then find the min and max values of column B and delete all other rows.
Example:
A worker comes to work and registers at 7:55, at 11:00 he registers for lunch and comes back 30min later. At 16:05 he leaves work and all I need is to remove the lunch time for all the days of the month.
Existing table:
<tbody>
</tbody>
Desired table:
<tbody>
</tbody>
If there is no lunch registered, than it should just copy the data... I need it to find min and max values of column B, when more than 2 identical values are found in column A.
I searched for an answer, but all I can find is macros that find either min or max, not both.
Can anybody help me with this? It would be much appreciated.
I need a macro that can find multiple identical values in column A, then find the min and max values of column B and delete all other rows.
Example:
A worker comes to work and registers at 7:55, at 11:00 he registers for lunch and comes back 30min later. At 16:05 he leaves work and all I need is to remove the lunch time for all the days of the month.
Existing table:
1. jul | 07:55 |
1. jul | 11:00 |
1. jul | 11:30 |
1. jul | 16:05 |
2. jul | 07:45 |
2. jul | 11:23 |
2. jul | 11:50 |
2. jul | 16:15 |
3. jul | 07:57 |
3. jul | 11:11 |
3. jul | 11:43 |
3. jul | 16:20 |
<tbody>
</tbody>
Desired table:
1. jul | 07:55 |
1. jul | 16:05 |
2. jul | 07:45 |
2. jul | 16:15 |
3. jul | 07:57 |
3. jul | 16:20 |
<tbody>
</tbody>
If there is no lunch registered, than it should just copy the data... I need it to find min and max values of column B, when more than 2 identical values are found in column A.
I searched for an answer, but all I can find is macros that find either min or max, not both.
Can anybody help me with this? It would be much appreciated.
Last edited: