I have a macro right now which makes a selection and then checks that selection to make sure it has less than 5,000 rows. If it has more, then a message box appears and we end the macro. However, in order for this macro to work properly for me, I need to change the if statement so that instead of checking for the amount of rows selected, I only need it to check if ROW 2 is selected. Is this possible? If not, can we have an IF statement to check the contents of ROW 2 (Row 2 is my header on the worksheet and will never change)? Here is the code I currently have:
Range("F2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, -5).Select
Range(Selection, Selection.End(xlUp)).Select
If Selection.Rows.Count > 5000 Then
MsgBox ("ERROR, Enter Data Description First")
ActiveCell.Offset(1, 1).Select
ChoosePrj.Hide
Exit Sub
End If
Selection.FillDown
Bookmarks