View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Matt S Matt S is offline
external usenet poster
 
Posts: 112
Default calculations with arrays help

Thanks Bernie... Here's a table:

Row.....Temp...Label
1.........123.....Mode 1
2.........242.....Mode 1
3.........292.....Mode 2
4.........317.....Mode 2
5.........300.....Mode 3
6.........250.....Mode 3
7.........219.....Mode 4
8.........200.....Mode 4
9.........215.....Mode 1
10........210.....Mode 1
11........190......Mode 2
12........275......Mode 2
etc

I want to average Mode 1 on rows 1 and 2 and save that to a 2-dimensional
array as Data_Array(cycle 1, calc 1). Data_Array(cycle 1, calc 2) would be
another calculation for that cycle. Data_Array(cycle 2, calc 1) would be the
average of rows 9 and 10. The temperature and the labels are both their own
arrays. With 50hours of data, I'd rather try to keep the formulas in the
array form.

THANK YOU SO MUCH!
Matt

"Bernie Deitrick" wrote:

Matt,

A _small_ data table showing what you mean, and the result you would expect from the example, would
be of great help in presenting a solution.

I do not want to do the average of all
Mode 1's, rather the individual averages of all cycles.


HTH,
Bernie
MS Excel MVP


"Matt S" wrote in message
...
Hi all (again),

I have successfully made an array that labels my data into 4 modes. The 4
modes repeat continuously for fifty hours, so my labelarray labeled what mode
I'm in per second.

Now I have the arduous task of doing calculations on the array while it is
in a certain mode cycle. For example, I'd like to take the average of my
TemperatureArray while my LabelArray is in Mode 1 for this cycle and record
that cycle average in a new array. I do not want to do the average of all
Mode 1's, rather the individual averages of all cycles.

I've been sitting here for an hour trying to think of a conceptual way to do
this, but am completely stumped.

Any suggestions??
THANKS!
Matt