I'm trying to set up a Subroutine that deletes blank rows in a report, then sorts the rows by the time. I'm not sure what is going on with it, but below is the full routine:
The delete works fine, but the sort errors out: "Run-time error '1004': The sort reference is not valid. Make sure that it's within the data you want to sort, and the first Sort By box isn't the same or blank."
Does it matter that EndCell is empty? Every cell in timecolumn is populated with a time, correctly formatted.
I don't have any blank rows, so I can't use CurrentRegion to select the sort area. But if there's another way to write that line, I'd appreciate any info you can give.
Bookmarks