Hi,

I have received some great help so far but have stumbled upon another code issue I can't seem to get around.

In short I have between 25-45 workbooks with tons of data that are copied from other instances (reports). I need to filter and sort this data in an effective way in excel and doing things manually and using formulas is not time efficient for this kind of work.

Currently I have a workbook containing multiple sheets but my focus for now is Sheet1 and Sheet2.

On Sheet1 I currently run two macros. One to change column B text into information (is created as text from a report) and then I run a Macro (received help in here in a recent post) that checks column B in Sheet2 and removes any row in Sheet1 not containing those numbers on column B. So this would be the third macro.

In both Sheets column B contains an employee ID.
In Sheet1 column A I have another number identifying how old the employment is. Sheet1 looks like this:

Nr Empl. ID
A B
14 123456
133 123456
154 123456
1130 123456
8971 123456
25 234567
134 234567
2764 234567

I can easily setup a macro to remove rows with duplicates. But I can't seem to be able find any solid information online on how to setup a macro that removes duplicates in column B and keeps the row with the higest value in column A.

The result of the macro should be like this:

A B
8971 123456
2764 234567

The duplicates in column B is removed and it keeps the highest value in column A. This is important since there 10 other columns containing necessary information for other macros later on but the other macros wont work if there are duplicates in this sheet.

Any smooth way to solve this?

Thanks in advance.

Regards

/René