I have tried to write code to delete duplicate headings for all workbooks in a folder that is selected
I get a run time error when running the macro
It would be appreciated if someone could assist me
I have tried to write code to delete duplicate headings for all workbooks in a folder that is selected
I get a run time error when running the macro
It would be appreciated if someone could assist me
Try putting this lineback to what it was originally.Please Login or Register to view this content.
If that doesn't work, then you might want to consider giving us some more information.
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Hi Guys
Thanks for the help, but I get a run time error
Attached please find sample workbook, containing two duplicate headings In row1
I have the workbooks in one folder C:\testdata
I would like the macro to delete all duplicate headings in sheet1 in the folder
Kindly test & amend code
What is the error & what line is highlighted?
The error is "method of union of object_global failed"
The following code in the line below from from Else: is highlighted
Please Login or Register to view this content.
That's because you have moved this linetry putting it back where it was.Please Login or Register to view this content.
Blank Headers there are...Try this you can...
Please Login or Register to view this content.
Thanks Guys
The Code Runs perfectly using the amended code, but does not delete the duplicate header i.e. the second headers the are duplicated AP1 & AQ1
What duplicate headers where
Ap1 & AQ1 are the same as N1 & O1 so AP1 & AQ1 to be deleted
Kindly test & amend code
TryPlease Login or Register to view this content.
Many Thanks for the help Fluff13
Your code works 100%
Of course...did not even consider to test...Delete code beyond loop...My bad...
Glad you got it sorted...
No Problem Sintek. At least it has been resolved and many thanks for your input and help, which I always value
You're welcome & thanks for the feedback
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks