I have a macro that colors the rows within a selected range if duplicate cells are found. The macro can't handle an entire sheet selection in Excel 2010, so I want to check on the front end that they haven't selected the entire sheet, but I can't find a check to ensure the entire sheet is not selected. I thought I had it with this routine:
If Selection.Count >= Rows.Count Or Selection.Count >= Columns.Count Then
which checks if an entire column or an entire row is selected. However, it generates an overflow error if the entire sheet is selected. Any help is appreciated.
Thanks,
John
Bookmarks