2 workbooks, cut & paste into columns by date

Jbmcd

New Member
Joined
May 13, 2014
Messages
9
I have an ambitious project I need to do, I really need some help. I’m trying to create a macro to track daily sales. There will be several sales from different accounts each day.


I have 2 work books, workbook 1 and workbook 2. I need to click a button in workbook 1, sheet1 that will cut the data from columns A and B and paste the data into wookbook 2 by date. Each column in workbook 2 is set up by date for each day of the month. I have 12 sheets in workbook 2, one for each month set up by day of the month in separate columns on each sheet.


There will be several different accounts entered of sales data for each day. When the data is copied/pasted to workbook 2 I can’t have the data overwriting its self. In the columns in workbook 2 Ideally there would be an empty line in each column after each account entry just to make reading the report easier.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Can you post an example of the "input data" and the "output data" you are hoping to achieve ?
 
Upvote 0
I'm new to writing macros, so any advice pointing me in the right direction would be greatly appreciated. In the above examples the products are fictional because the company I work for needs to keep everything propriety.
 
Upvote 0
I have created a macro that works as far as copying/cut and paste between the 2 workbooks. How ever it overwrites my data every time I run the macro. Can anyone tell me how to modify the macro so that when I run the macro each time it will not overwrite previous data when pasting and also leave a blank line between data pastes? I also still have to figure out how to paste that macro data by date.

Here is the code I am using:

Sub CutPaste()
'
' CutPaste Macro
'

'
Range("A1:B15").Select
Selection.Copy
Windows("CT-OP.xlsx").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Windows("CTI-OP.xlsm").Activate
Range("A2").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A5").Select
Selection.ClearContents
Range("A6").Select
Selection.ClearContents
Range("A7").Select
Selection.ClearContents
Range("A8").Select
Selection.ClearContents
Range("A9").Select
Selection.ClearContents
Range("A10").Select
Selection.ClearContents
Range("A11").Select
Selection.ClearContents
Range("A12").Select
Selection.ClearContents
Range("A14").Select
Selection.ClearContents
End Sub
 
Upvote 0

Forum statistics

Threads
1,196,385
Messages
6,014,980
Members
441,860
Latest member
Store154

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