I am not very familiar with macro’s so please help!
This is the situation.
I have a standard “input-sheet” in my excel file.
For every single input file ( a questioner) that I get from a participant, I copy and paste it on to the input-sheet so that totals can be calculated. Every single input file has got its own ID no.
On other sheet, I have to copy the totals of every new input file along with its ID no., so that I can compare the totals of different ID’s at the end of the day.
So I need to create a macro that enables me
When I copy and paste a new input file onto my “input-sheet” :
1. Every single ID no. is copied onto new sheet “output-sheet”.
2. The totals’ that are automatically calculated at the end row of the input-sheet will be copied on “output-sheet” along with the ID no.
3. When the next (new) input file is pasted the new ID along with the new totals will be copied on next row on the “output-sheet” without affecting the first row.
This is my micro, but it doesn’t work the way I wanted it.
' Macro11 Macro
'
Range("A2").Select
Windows("input-1.xlsx").Activate
Selection.Copy
Windows("Economic modelNL.xlsm").Activate
ActiveSheet.Paste
Sheets("Cost-effective analysis").Select
Range("A9").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "='Input-1'!R[-3]C[1]"
Range("B9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[25]C[3]"
Range("C9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[25]C[4]"
Range("D9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[25]C[5]"
Range("E9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[25]C[6]"
Range("F9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[25]C[7]"
Range("G9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[25]C[8]"
Range("H9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[26]C[-3]"
Range("I9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[26]C[-2]"
Range("J9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[26]C[-1]"
Range("K9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[26]C"
Range("L9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[26]C[1]"
Range("M9").Select
ActiveCell.FormulaR1C1 = "='Input-1'!R[26]C[2]"
Range("A9:M9").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Input-1").Select
Application.CutCopyMode = False
End Sub
Thanks a lot in advance
Bookmarks