Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array Programming in Excel 3

Status
Not open for further replies.

GaDawg

Mechanical
May 27, 2003
22
I am trying to generate a list of results from a list of values by plugging each value into a formula to calculate the result. My list of values is quite extensive so I would like to have Excel increment through the list and produce a result for each, thus generating a respective list of results. Does anyone know how I might accomplish this using Excel? Any help I get will be greatly appreciated. Thanks.

GaDawg
 
Replies continue below

Recommended for you

Hello,

Not certain of how your tables are laid out, but this is what I did
A1 I enter 1
A2 I enter 2
etc
A10 I enter 10

Then I run this code

Dim MY_RESULT(65536) As Variant
Sub CALCULATE_LIST()
For MY_ROWS = 1 To Range("A65536").End(xlUp).Row
MY_RESULT(MY_ROWS) = Range("A" & MY_ROWS) * 2
Range("B" & MY_ROWS).Value = MY_RESULT(MY_ROWS)
Next MY_ROWS
End Sub

IS this of an use?

----------------------------------
Hope this helps.
----------------------------------

maybe only a drafter
but the best user at this company!
 
Yes, Thanks. I will give it a try.
 
i'd investigate the autofilter capabilities within excel.

from main menu, select Data - Autofilter.

the data must be in continuous rows or at least select teh entire range of data when activating this command. would be helpful if each column had a title.

use xl's help system for further explanation of the autofilter command.

good luck!
-pmover
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor