Macro Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a set of data that looks like this but with many more rows of data
LIRI RIRI L-Rut R-Rut AvgLIRI
1.05 1.03 2 1 1.42
1.18 0.59 2 2
1.76 1.29 3 3
1 0.99 3 3
0.59 0.95 2 2 1.53
I have a macro that will count through the first 4 rows of LIRI and will
calculate the average over this interval. The original macro is without
truncation so that when i select the first cell in AvgLIRI for the second 4
values of LIRI the cell # will be appropriate to calculate the average for
the next 4 values. The problem I am having is that I need a macro that will
then take all the values the previous macro found to transfer these values to
a second sheet without the gaps between each value.
 
Why don't you do the writes to the 2nd sheet at the same time you are writing
the dataz to the 1st sheet

RowCount = 1 'add
old loop

sheets("Sheet2").cells(RowCount,"A").value = FourRowAverage
RowCount = RowCount + 1
end of loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top