Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trouble with arrays (transferring values between two arrays) | Excel Programming | |||
Working with ranges in arrays... or an introduction to arrays | Excel Programming | |||
Arrays - declaration, adding values to arrays and calculation | Excel Programming | |||
Arrays in macros | Excel Programming | |||
weird saving of a document with macros resulting with macros being transfered to the copy | Excel Programming |