ludmilla91
New Member
Dear Everybody,
I'd like to expand this code to my whole worksheet, which has 327 rows.
Sub program()
'
' program Macro
'
'
'
Range("D1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-1],"" "",R[1]C[-3])"
Range("D1").Select
Selection.Copy
Range("D2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C1:D1").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("D2").Select
Selection.Copy
Range("C1").Select
ActiveSheet.Paste
Rows("2:3").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Range("A2").Select
Selection.Copy
Range("B1").Select
ActiveSheet.Paste
Range("E1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=IF((LEFT(RC[-4],4))>(LEFT(RC[-3],4)),1,0)"
Range("E2").Select
End Sub
How should I do that? Sorry, I'm an absolute beginner in this field.
Thank you,
Ludmilla
I'd like to expand this code to my whole worksheet, which has 327 rows.
Sub program()
'
' program Macro
'
'
'
Range("D1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-1],"" "",R[1]C[-3])"
Range("D1").Select
Selection.Copy
Range("D2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C1:D1").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("D2").Select
Selection.Copy
Range("C1").Select
ActiveSheet.Paste
Rows("2:3").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Range("A2").Select
Selection.Copy
Range("B1").Select
ActiveSheet.Paste
Range("E1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=IF((LEFT(RC[-4],4))>(LEFT(RC[-3],4)),1,0)"
Range("E2").Select
End Sub
How should I do that? Sorry, I'm an absolute beginner in this field.
Thank you,
Ludmilla