Writing to 2nd worksheet in workbook

M

Mike

Pulling data from an outside application into an Excel
workbook. Have multiple worksheets in the workbook. I
have been able to write to the first worksheet with the
correct data but then activate the 2nd worksheet to write
the different data to it but is overwriting the data on
the 1st worksheet. Although it changes and activates the
2nd worksheet.

'Get WELL Information

Worksheets("Wells").Activate
Range("A3:A100").Sort Key1:=Range("A1")

Does the Range need to be reset to the 2nd worksheet, if
so, how would I go about doing this.
 
S

steve

Mike,

Your code only shows a sort. There is nothing here that should overwrite
any data. What is the rest of your code? And how do you want to write to
the 2nd sheet?

You can copy from one sheet to the next with something like
Sheets("Sheet1").Range("A3:A100").Copy _
Destination:= Sheets("Sheet2").Range("A3")

where Sheet1 and Sheet2 are the names of the worksheets.
You only need to set a single cell for the paste.
 

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