jardenp
Active Member
- Joined
- May 12, 2009
- Messages
- 373
- Office Version
- 2019
- 2016
- 2013
- 2011
- 2010
- Platform
- Windows
This may not be expressed well, but...
I want to create an array from a large range (changes depending on the data but let's say A1:Y7000). This is easy enough with something like
dim rg as range
set rg = range("A1:Y7000")
Dim arr() as variant
arr = rg
However, I want column and row 0 and when I do this I get LBound(arr) = 1. I need the 0 column to hold a calculated value and I need the array column assignments to match the range columns because I have a lot of column name variables at play.
I do not have "option base 1" set and trying "option base 0" didn't help.
I know I can do a loop through the range but I was hoping for a simpler approach. Any thoughts?
I want to create an array from a large range (changes depending on the data but let's say A1:Y7000). This is easy enough with something like
dim rg as range
set rg = range("A1:Y7000")
Dim arr() as variant
arr = rg
However, I want column and row 0 and when I do this I get LBound(arr) = 1. I need the 0 column to hold a calculated value and I need the array column assignments to match the range columns because I have a lot of column name variables at play.
I do not have "option base 1" set and trying "option base 0" didn't help.
I know I can do a loop through the range but I was hoping for a simpler approach. Any thoughts?