Thank you so much for the response. I appreciate the tip about the redundancy of the .Select/Selection. pairing. I've learned most of my VBA coding by studying the output of the macro recorder, and separating the selection and acting on the selection is surely a result of that.
With your code I still run into problems if there is only data on rows 1 and 2. I have written a workaround using IF THEN, but I'd be interested to know if there is a way of sort of defining ranges "on the fly" that would allow for data only in rows 1 and 2, or even just in row one, since the data sets I'll be applying this code to will sometimes only have the header/label row and no data rows (for this particular sheet in the workbook).
Is the problem that the "Cells(Rows.Count, "A").End(xlUp).Row" part can't return the same row number as the "H2:H" part?
Thanks again.
-JP




Reply With Quote

Bookmarks