Array question for Excel VBA
Posted on 2002-06-14
I need to build an array that only should contain unique strings that must not exist more the once in the array. (even if the range can include duplicates of the string)
I have a range A1:A100 to conatins strings (names to other sheets in a Excel workbook).
I need to filll an array with all the strings in this range, but there must NOT be any duplicates of the strings. And I also need to check if the string in each cell of the range is a name to a worksheet that exist.
Does anyone know how to do this in VBA?
I am a delphi coder, and how not found any good VBA reference.
Lets say I have a range in Excel that looks like this:
A B C D
Lets say that my Excel Workbook has a coresponding sheet for each of this strings, except for "TestSheet" in cell A8. I now need to build an array that looks like:
A unique string should only exist once in the array and if there is no worksheet with the same name as the string, it should also not be included in the array.
Can all this be done with VBA in Excel?