Sub foobar()
Dim wine As Variant
wine = Array("Red", "White", "Rose", "Sparkling")
Dim spirits As Variant
spirits = Array("Vodka", "Whiskey", "Rum", "Gin")
Dim beer As Variant
beer = Array("Ale", "Lager", "Pilsner", "Stout")
Dim inventory As Variant
inventory = Array(wine, spirits, beer)
Range("A1") = inventory(1)
End Sub
My current idea is to put the name of the array in the array,
wine = Array("wine", "Red", "White", "Rose", "Sparkling")
spirits = Array("spirits", "Vodka", "Whiskey", "Rum", "Gin")
beer = Array("beer", "Ale", "Lager", "Pilsner", "Stout")
inventory = Array(wine, spirits, beer)
Therefore inventory(x)(0) will always return the name of the array that way.
I want "A1" to show the name of the Dimension, i.e. spirits, but spirits itself is an array, so in "A1" I get the equivalent of inventory(1)(0).
Is there a better way to get the wine, spirits, or beer Dimensions returned as their name, than to include the name in the array (as above)?