IsNotText expects a variant, but you're sending it an array. Try processing each value in turn using a loop, rather than sending as a group.
https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.isnontext
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I get RTE 13 for the below conditions?
UserRange is from Inputbox Type 8
UserXRange{1,2,3,4,5,6,7,8,9,10}
UserYRange{0.2, 0.7, 0.8, 1.1, 2.4, 2.9, 4.7, 6.4, 7.9, 11.3}
If Not WorksheetFunction.IsNonText(UserXRange) = True Or Not WorksheetFunction.IsNonText(UserYRange) = True Then
MsgBox "Range values can't be text"
Exit Sub
End If
If Not WorksheetFunction.IsNumber(UserXRange) = True Or Not WorksheetFunction.IsNumber(UserYRange) = True Then
MsgBox "Range values have to be integer or decimal"
Exit Sub
End If
IsNotText expects a variant, but you're sending it an array. Try processing each value in turn using a loop, rather than sending as a group.
https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.isnontext
So, loop is the only option.
I can't use formula in VBA like in excel =SUM(--(ISNUMBER(A1:A10)))