Sorry but I didn't understand the « columns C and D row changes
the ranges headers » …
As my code works with your last csv joined files …
Marc
See attached screenshot of original csv and after saving again excel in csv the difference in column c and d . row 12 and row 14, row 1 and row3 for each csv.
Range headers differ also.
in doing so it makes both macros work as per 1st csv file post.
making the macros to work in original interface has issued macros errors.
So I think it is best saved in csv excel format and to apply the macros.

