Copy data from one excel to another excel

AMIT JAJOO

New Member
Joined
Jan 11, 2016
Messages
6
Hi,need a help on macro,

I want to copy data from one sheet to the row below the last row on another sheet.

Code:
Workbooks.Open Filename:= _
"C:\Man Macro File.xlsx"
Sheets("Turnover").Select
Range("A1").Select
Workbooks.Open Filename:= _
"C:\over Report.xls"
Range("B12:B13").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Windows("Man File.xlsx").Activate
ActiveSheet.Paste
Windows("over Report.xls").Activate
ActiveWindow.Close
Sheets("fpi").Select
Range("A1:G1").Select
Workbooks.Open Filename:= _
"C:\stats.xls"
Range("A1:G7").Select
Selection.Copy
Windows("Man File.xlsx").Activate
ActiveSheet.Paste
Windows("stats.xls").Activate
ActiveWindow.Close
Workbooks.Open Filename:= _
"C:\Data Instument .xlsx"
Range("D44").Select
Windows("Man File.xlsx").Activate
ActiveSheet.Previous.Select
Range("J6:M6").Select
Selection.Copy
Windows("Data Instument .xlsx").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Man File.xlsx").Activate
ActiveSheet.Next.Select
Windows("Data Instument .xlsx").Activate
Range("H44").Select
Windows("Man File.xlsx").Activate
Range("C15:F15").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Data Instument .xlsx").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Man Macro File.xlsx").Activate
Range("C19:F19").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Data Instument .xlsx").Activate
Range("L44").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("P43:AB43").Select
Application.CutCopyMode = False
Selection.Copy
Range("P44").Select
ActiveSheet.Paste
Range("C44").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=today"
Range("C44").Select
ActiveCell.FormulaR1C1 = "=to"
Range("C44").Select
ActiveCell.FormulaR1C1 = "=(today)"
Range("C44").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Rows("43:43").Select
Range("C43").Activate
Selection.Copy
Rows("44:44").Select
Range("C44").Activate
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("C45").Select
ActiveWorkbook.Save
ActiveWindow.Close
ActiveWorkbook.Save
ActiveWindow.Close
ActiveWorkbook.SaveAs Filename:= _
"C:\macro.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
 
Last edited by a moderator:

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,216,030
Messages
6,128,408
Members
449,448
Latest member
Andrew Slatter

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