gravanoc
Active Member
- Joined
- Oct 20, 2015
- Messages
- 348
- Office Version
- 365
- Platform
- Windows
- Mobile
My current need is for a flexible array as mentioned in the title, so I can insert it into a formula with VBA.
This is how it always starts:
Next I would like for it to be the same except dropping the 10.
This continues until the iteration is using 1 by itself.
My current solution would be to use Select Case to determine which to go with; however, the other problem is that array variables aren't working when I insert them via otherRange.Formula2 = "...".
Specifically, I've tried setting a variable named Arr = Array(1, 2, 3,4...., 10), then putting it in:
Other variations are also not working.
Thanks.
This is how it always starts:
Excel Formula:
=SMALL(myRange, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
Next I would like for it to be the same except dropping the 10.
Excel Formula:
=SMALL(myRange, {1, 2, 3, 4, 5, 6, 7, 8, 9})
This continues until the iteration is using 1 by itself.
My current solution would be to use Select Case to determine which to go with; however, the other problem is that array variables aren't working when I insert them via otherRange.Formula2 = "...".
Specifically, I've tried setting a variable named Arr = Array(1, 2, 3,4...., 10), then putting it in:
VBA Code:
otherRange.Formula2 = "=SMALL(" & myRange.Address & ", {" & Arr & "})"
Other variations are also not working.
Thanks.