ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   appending to second worksheet from a Master Sheet (https://www.excelbanter.com/excel-programming/282927-appending-second-worksheet-master-sheet.html)

Driver

appending to second worksheet from a Master Sheet
 
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



Tom Ogilvy

appending to second worksheet from a Master Sheet
 
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

--
Regards,
Tom Ogilvy


Driver wrote in message
ink.net...
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






All times are GMT +1. The time now is 01:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com