I have an integer called NumRows that I want to be set equal to a dynamic range. It works for all values other than if the range is only equal to 1. Can anyone help?
Here is my code.
' Set numrows = number of rows of data.
If (Range("B101", Range("B101").End(xlDown)).Rows.Count > 1) Then
NumRows = Range("B101", Range("B101").End(xlDown)).Rows.Count
Else
NumRows = 1
'End If
Here is my code.
' Set numrows = number of rows of data.
If (Range("B101", Range("B101").End(xlDown)).Rows.Count > 1) Then
NumRows = Range("B101", Range("B101").End(xlDown)).Rows.Count
Else
NumRows = 1
'End If