Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Arrays and Macros

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with arrays (transferring values between two arrays) Keith R[_2_] Excel Programming 4 November 14th 07 12:00 AM
Working with ranges in arrays... or an introduction to arrays Glen Excel Programming 5 September 10th 06 08:32 AM
Arrays - declaration, adding values to arrays and calculation Maxi[_2_] Excel Programming 1 August 17th 06 04:13 PM
Arrays in macros Bradley Excel Programming 7 September 23rd 05 10:49 AM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"