S
suyash.nathani
I have a macro in which I want to copy a value from a cell in Workbook
A to a cell in Workbook B.. However,when pasting it into Workbook B, I
want to add it to the previous value.. Simply pasting it replaces the
value. Is there a way to paste a value while adding it to the previous
value ??
Any help will be greatly appreciated.. Thanks a lot to all the experts
out there..!! I'm copying the code of the macro below.. macro sits in
workbook A :-
Sub OrderingList_Click()
Workbooks.Open Filename:="Workbook B.xls"
Sheets("Delays").Select
Range("n36").Select
For i = 36 To 300
Set curCell = Worksheets("Delays").Cells(i, 14)
If curCell.Value = "Marine Logistics" Then
curCell.Offset(0, 2).Select
End If
Selection.Copy
Windows("Workbook A.xls").Activate
Range("e10").Select
Selection.PasteSpecial Paste:=xlValues ' This replaces the value
each time.code which can add to prev value?
Windows("Workbook B.xls").Activate
'ActiveCell.Offset(0, -2).Select
Next i
End Sub
A to a cell in Workbook B.. However,when pasting it into Workbook B, I
want to add it to the previous value.. Simply pasting it replaces the
value. Is there a way to paste a value while adding it to the previous
value ??
Any help will be greatly appreciated.. Thanks a lot to all the experts
out there..!! I'm copying the code of the macro below.. macro sits in
workbook A :-
Sub OrderingList_Click()
Workbooks.Open Filename:="Workbook B.xls"
Sheets("Delays").Select
Range("n36").Select
For i = 36 To 300
Set curCell = Worksheets("Delays").Cells(i, 14)
If curCell.Value = "Marine Logistics" Then
curCell.Offset(0, 2).Select
End If
Selection.Copy
Windows("Workbook A.xls").Activate
Range("e10").Select
Selection.PasteSpecial Paste:=xlValues ' This replaces the value
each time.code which can add to prev value?
Windows("Workbook B.xls").Activate
'ActiveCell.Offset(0, -2).Select
Next i
End Sub