Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another way IF your array is a String array (which your example seems to
indicate), this method will not work with a non-String array is like this... If Replace(Join(YourArray, ""), YourArray(LBound(YourArray))) = "" Then if you want case sensitive equality (one < One); or like this... If Replace(Join(YourArray, ""), YourArray(LBound( _ YourArray)), "", , , vbTextCompare) = "" Then if you want case insensitive equality (one = One) -- Rick (MVP - Excel) "Shawn" wrote in message ... Does anyone have a good way in VBA to determine if every element in an array is the same/equal? Or if each item in a range is the same/equal? ie. are ('one','one','one') equal? Yes. Or are ('one','one','two') equal? No. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Make sure all items in a Collection equal the same thing | Excel Programming | |||
Determine if item is in a range of items | Excel Programming | |||
How do I determine which numbers in a list equal a given sum? | Excel Discussion (Misc queries) | |||
Determine which cells from a specific range equal a certain sum | Excel Worksheet Functions | |||
lower and upper case equal on spreadsheet but not equal in VB | Excel Programming |