Hi,
I need a vba macro for my xlsx file.
I have a file with header and 3 columns.
The column "col1" could contain duplicated values.
But the duplicates values have to be grouped together
The following is OK
col1 col2 col3
4 xx xx
4 xx xx
2 xx xx
3 xx xx
3 xx xx
The following is NOK
col1 col2 col3
4 xx xx
4 xx xx
2 xx xx
2 xx xx
3 xx xx
4 xx xx
So the idea is to have that macro called when the file is saved and if the all the duplicated values in col1 are not group together, then prevent the safe with an error message.
I do already know how to called a macro before saving via Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
I need the macro.
Thanks a lot.
Bookmarks