cooper645
Well-known Member
- Joined
- Nov 16, 2013
- Messages
- 639
- Office Version
- 365
- Platform
- Windows
- MacOS
- Mobile
- Web
Below is the code i have that works for me with no problems at the moment,
the green comments are a description of what the macro should be doing
the red text is the code which needs revising
AND
the blue text is what i am trying to achieve rather than the red text
If you need anymore information, i can happily supply it.
Thanks in advance
Coops
Edit; I'm using Excel 2010, Win 7 (if that makes a difference)
the green comments are a description of what the macro should be doing
the red text is the code which needs revising
AND
the blue text is what i am trying to achieve rather than the red text
If you need anymore information, i can happily supply it.
Code:
Sub Renew()
[COLOR=#008000]' Take User Selected Cells[/COLOR]
[COLOR=#008000]' Strike them through and copy them[/COLOR]
[COLOR=#008000]' Paste them into the next empty row in column B[/COLOR]
[COLOR=#008000]' Un strike them through[/COLOR]
[COLOR=#008000]' Put the current date in the first cell in the datas new range in Column F[/COLOR]
[COLOR=#008000]' Auto fill that date down the new range of data[/COLOR]
Dim myRange As Range
Set myRange = Selection
myRange.Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = True
End With
Selection.Copy
[COLOR=#ff0000]Range("B29").Select[/COLOR][COLOR=#0000ff] 'Need to change this to find next empty row in Column B (Column A has Serial values already)[/COLOR]
ActiveSheet.Paste
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
End With
[COLOR=#ff0000]Range("F29").Select[/COLOR][COLOR=#0000ff] 'This should select the F cell in the new datas pasted range[/COLOR]
[COLOR=#ff0000]ActiveCell.FormulaR1C1 = "8/28/2015"[/COLOR] [COLOR=#0000ff]'This should insert date the macro was run on[/COLOR]
[COLOR=#ff0000]Selection.AutoFill Destination:=Range("F29:F49"), Type:=xlFillCopy[/COLOR] [COLOR=#0000ff]'This should autofill only the new range of copied data[/COLOR]
End Sub
Thanks in advance
Coops
Edit; I'm using Excel 2010, Win 7 (if that makes a difference)
Last edited: