Arrays and Macros
Use VBA.
Define an array(s) where to keep your range(s).
Unless you need local arrays,
locate the array on a Module rather than on the worksheet code page, so you
can see if from every worksheet.
Copy the range, cell by cell to the array.
Get your cell value to answer the IF functions.
with
var = Workbooks("file.xls").Worksheets("sheet1").Cells(R ow, Col).Value
or ActiveWorkbook.Worksheets("sheet1").Cells(Row, Col).Value
for the range you'll need some
dim c as cell
for each c in Workbooks("file.xls").Worksheets("sheet1").Range(" RangeName")
or ....rows.count ... columns.count
Use Shift+F9 with ..Range("RangeName") and dig into the structure to see
what's available .
"JDevsFan" wrote:
Hello, I need help figuring out an array macro. I need to run a macro from
one page, check a cell on another page to see if it is a 1 or a 2, if it is a
1 I need to take a range of cells and store it to a macro for later use, and
if it is 2 store it in another macro for later use. Then take each of the
built array's and place them in a specific range of cells. I have tried
numerous things but nothing seems to be working for me. Any ideas or
thoughts from anybody?
Thanks,
|