silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys,
just wondering how I can check if all values in an one dimensional array are the same.
If all are the same then all good continue with code if not then stop and give me a waring
How would I do that?
The array does not need to be put back into a worksheet only stop the code from running if there is a different value in that array.
Many thanks for your help!
just wondering how I can check if all values in an one dimensional array are the same.
If all are the same then all good continue with code if not then stop and give me a waring
Code:
Sub ZellenPruefen()
Dim arrIB() As Variant
Dim i As Integer
arrIB = Range("A2", Range("A1").End(xlDown))
For i = LBound(arrIB) To UBound(arrIB)
arrIB(i, 1) = arrIB(i, 1)
Next i
End Sub
How would I do that?
The array does not need to be put back into a worksheet only stop the code from running if there is a different value in that array.
Many thanks for your help!