Array Programming in Excel
Array Programming in Excel
(OP)
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
GaDawg
RE: Array Programming in Excel
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!
RE: Array Programming in Excel
RE: Array Programming in 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