Search : in
By :

Macro Paste cell to next column and copy down

davekrohne, on Nov 5, 2009 5:50:00 pm GMT 
 Report this message to moderators

Hello,
I am attempting to write a macro in Excel 03 that copies a formula from one cell, D30, and paste this into cell d31 and then down the column to cell D109 and then copy all of this and paste it into the same cell location as values. Then when i update my reports the next day I want it to still copy the formula in D30 but then paste this into cell e 31 and down that column to c109 and so on.
I have got the macro to paste the formula into d31 and down to d109 but the next time i run it it only pastes into c31 but not down the column;

here's the code i am using;

Sub PasteValToNextColumn()

Application.ScreenUpdating = False

Dim Nextcolumn As Range
Set Nextcolumn = Sheets("01151 COS").Range("b31").End(xlToRight).Offset(0, 1)
Sheets("01151 COS").Range("d30").Select
Selection.Copy
Nextcolumn.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("01151 COS").Range("d31").Select
Selection.Copy
Range("D32:D109").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Sheets("01151 COS").Range("d31:d109").Select
Selection.Copy
Range("D31:D109").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False



End Sub

Any assistance would be greatly appreciated

Thanks

Configuration: Windows XP Internet Explorer 6.0

Best answers for « Macro Paste cell to next column and copy down » in :
Excel – Comparing cell A1 to entire A column in Sheet 2 ShowExcel – Comparing cell A1 to entire A column in Sheet 2 Issue Solution Note Issue I have been trying to compare sheet1 A2 to sheet2 A2 through A500 and if it exists somewhere in sheet2's a col then copy that entire row to a new sheet....
Copy/Paste problems when using Firefox ShowCopy/Paste problems when using Firefox Pushow Adware Extensions It happens that sometimes, Firefox refuse to copy/paste items. Two assumptions can be made: Pushow Adware You have been infected by an adware, named pushow**.dll...
Basic Excel Formulas ShowBasic Excel Formulas Below are some basic formulas for Microsoft excel: Basic formula : ADDITION cell A1 to A10 = sum (A1: A10) AVERAGE cell A1 to A10 = average (A1: A10) MAXIMUM cell A1 to A10 = max (A1: A10) MINIMUM...
Download CopyTrans Suite ShowCopyTrans Suite is a set of practical tools for your Ipod or Iphone. It contains: · CopyTrans v2.37 · CopyTrans Photo v2.21 · iLibs v1.13 · iCloner v1.07 · CopyTrans Doctor v1.015 · CopyTrans Manager v0.720 · SyncGuardian...
Download CopyTrans Suite ShowCopyTrans Suite is a set of practical tools for your Ipod or Iphone. It contains: - CopyTrans v2.37 - CopyTrans Photo v2.21 - iLibs v1.13 - iCloner v1.07 - CopyTrans Doctor v1.015 - CopyTrans Manager v0.720 - SyncGuardian v1.45 This...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...