Thanks stnkynts
I could not figure out the reason for the error, I don't get it either when I try. I did not fully test, but did run the macro a few times without error. That said, I don't think I tried it when the sheet is completely empty...