|Everything you are asking for can be done, such as checking for empty columns or U's or whatever.|
You can also force the entry of a Range by using the Input method which is different than the InputBox function, which you are using.
Dim rngStart As Range
Dim rngEnd As Range
Set rngStart = Application.InputBox("Enter the Starting Cell.", Type:=8)
Set rngEnd = Application.InputBox("Enter the Ending Cell.", Type:=8)
Type:= 8 forces the user to enter a Range reference.
However, with all the possibilities for errors, and the stupid user tricks we all see, I think you need to make this more bullet proof.
Some options that come to mind...
- Have the user select a Range and then run the macro on that selection. Less chance of an typographical error in the InputBox
- Use the code I suggested above, but ask the user to drag through the cells they want to check while the InputBox is visible. That will input the Range into the InputBox. You won't need 2 InputBoxes since the the entire Range can be placed into one InputBox.
Of course, this won't prevent the user from selecting or entering the wrong Range. You could use Column headings and then check to make sure that the first cell in the selected range matches a Column heading. If the first cell was "valid", you could then adjust the range within the macro to ensure it had the correct number of columns for the macro to work. That way, as long as the code ensures that the first column that the user selected was a data column, you could adjust the range so that it matches your worksheet.
One issue I'm not sure how to deal with is the fact that the user could select more or less rows or columns than they really wanted to check. I haven't figured out how to write a macro that reads minds, so if the user doesn't select or enter the correct Range, there's not much anyone can do about that - unless there is something like a "column ending label" that you could check for.