Hi Rob
I missed the obvious i.e. if no cell in row 1 has the text "Contract Type" then the macro throws an error and stops. Solution to that is to place auto filter settings "inside" the If statement. I'm also not totally happy with the CountA command this assumes every cell in range is not empty. So with all that in mind I've written a more "robust" macro.
This finds the rightmost column that is not "empty" and checks all columns (row 1) from first to the last column and I've also put the auto filter settings "inside" the If test.
Sorry about this.
Alf
Bookmarks