AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 1,835
- Office Version
- 2019
- 2016
- Platform
- Windows
I'm using .GetRows to move a recordset into an array in order to use the Filter command,
However the resultant array uses array(0, n) notation whereas Filter needs array notation
In Googling around for ways to convert the array I came across this:
If you are grabbing a singe row (with multiple columns) then use:
Securities = application.transpose(application.transpose _
(Worksheets(3).Range("A8:A" & SymbolCount).Value))
If you are grabbing a single column (with multiple rows) then use:
Securities = application.transpose(Worksheets(3).Range("A8:A" & SymbolCount).Value)
So, basically you just transpose twice for rows and once for columns.
It looks a nice solution, but I can't quite work out to apply it the 2D array.
Is is possible ?
Many thanks, ABB
However the resultant array uses array(0, n) notation whereas Filter needs array notation
In Googling around for ways to convert the array I came across this:
If you are grabbing a singe row (with multiple columns) then use:
Securities = application.transpose(application.transpose _
(Worksheets(3).Range("A8:A" & SymbolCount).Value))
If you are grabbing a single column (with multiple rows) then use:
Securities = application.transpose(Worksheets(3).Range("A8:A" & SymbolCount).Value)
So, basically you just transpose twice for rows and once for columns.
It looks a nice solution, but I can't quite work out to apply it the 2D array.
Is is possible ?
Many thanks, ABB