want ot record a macro without copying over previous data

auggie

New Member
Joined
Sep 18, 2002
Messages
1
I'm trying to write a macro that compiles data in rows. The macro works fine but it overwrites the data that I put into the file from the previous time the macro was ran. The macro is writing to a select address of rows (ie row 3,4,5,) and I would like the macro to write to the next set of rows (6,7,8) without overwriting row 3,4,5. I hope that makes some sense. I'm just a beginner and I'm using the macro recorder in excel. any help would greatly be appreciated.
Thanks,
Auggie
PS here is the code and where I copy to the uniquantD_Base to rows B1132:B1136 is where I am having my problem I think. I'm wanting to keep a continous account of the previous data on this uniquant work sheet, but as I have it now I overwrite those cells addressed above. I'm sorry I'm not very good at explaining my problem, hopefully by posting this code it will help.

Sub scmacs()
'
' scmacs Macro
' Macro recorded 9/19/2002 by August Petersen
'

'
Workbooks.Open FileName:= _
"C:WINDOWSDesktopswm test2Uq Smelter Daily Pellet Lotus Note.xls"
Workbooks.Open FileName:= _
"C:WINDOWSDesktopswm test2Uq Smelter Daily Pellets 2002.xls"
Workbooks.Open FileName:="C:WINDOWSDesktopswm test2SMD pellets.xls"
Range("A1:K24").Select
Selection.Copy
Windows("Uq Smelter Daily Pellets 2002.xls").Activate
Sheets("export_data").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("Calculation Sheet").Select
Range("B5:CC9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("UniquantD_Base").Select
Range("B1132").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.ScrollColumn = 11
Range("B1132:B1136").Select
Sheets("UniquantD_Base").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calc2_Sheet").Select
Range("B12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Report").Select
Range("B6:P25").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Uq Smelter Daily Pellet Lotus Note.xls").Activate
Range("B2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
This message was edited by auggie on 2002-09-19 19:24
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
hi - welcome to the board!

There will be a number of ways to sort this out - how about posting the code that you've currently got & a bit more info on what you're trying to do...

Paddy
 
Upvote 0

Forum statistics

Threads
1,222,441
Messages
6,166,056
Members
452,010
Latest member
triangle3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top