How can I complete a spreadsheet using macros?

W

Walter Heijboer

How can I complete a spreadsheet using macros?



The following is the scenario and request.



1.. Sheet 1 has been arranged to look like a form to enter data. A macro
clears all cells before entering new data.
2.. Sheet 2 obtains data from sheet by linking cells from sheet 1 & 2.
Some values are calculated in this sheet. Sheet 2 contains only one row of
data and it is cleared when cells on sheet 1 are cleared (link) for a new
entry.
3.. A macro to be run out from sheet 1 will go to sheet 2, copy the row,
go to sheet 3 and paste the data as values only.
I achieve the above sequence, but my problem is that when I enter new data
on sheet 1 that has to be coppied from sheet 2 into sheet 3 it replaces the
previous row on sheet 3. How can we get that the new data from sheet 2 be
pasted on sheet 3 below the previous record?



Hope somebody could provide me with a workable solurion.



Thanks in advance for you input.



Kind regards



Walter Heijboer
 
D

Dave Peterson

If you can pick out a column that's always used in sheet3, then you can find
that last used cell and come down one.

For example:

Dim NextRow as long
with worksheets("sheet3")
NextRow = .cells(.rows.count,"C").row + 1
end with

worksheets("sheet2").rows(17).copy _
destination:=worksheets("sheet3").cells(nextrow,"A")

(I don't know what row to copy, so I copied row 17!)
 
D

Dave Peterson

I, like many others, don't open attachments.

You may want to post back in plain text if no one jumps in.
 

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

Top