appending to second worksheet from a Master Sheet

  • Thread starter Thread starter Driver
  • Start date Start date
D

Driver

I have one worksheet, "wsA" where I'll do all the work and calculations.
Upon completion of the calculations, I want to copy the results to a single
row in a second worksheet, "wsB."

If I do another set of calculations in "wsA," I want the capability to
append the second set of calculations to "wsB," preserving the data from the
first calculations.

If I do 30 sets of calculations in "wsA," when I'm finished I want 30 unique
rows of calculated results in "wsB."

Can someone get me out of the blocks?

Merci Bien
 
dim rw as long, i as long
dim rng as Range
With worksheets("wsB")
set rng = .Cells(rows.count,1).End(xlup)(2)
End With

rw = 0
With worksheets("wsA")
for i = 1 to 10
.cells(3,"B").Value = i
' with automatic calculate, values should be recalculated
' before the next line is executed.
.cells(3,"B").Resize(1,10).Copy
rng.offset(rw,0).PasteSpecial xlValues
rw = rw + 1
Next i
End With
 
Back
Top