microsoft_excel:macros:create_sequence
Microsoft Excel - Macros - Create Sequence
Sub c_CreateSequence() range("A1").Select Selection.EntireColumn.Insert , CopyOrigin:=xlFormatFromLeftOrAbove range("A1").Value = "UNIQUE_ID" range("B1").Select Selection.Copy range("A1").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False range("A2").Select ActiveCell.FormulaR1C1 = "1" range("A3").Select ActiveCell.FormulaR1C1 = "=R[-1]C+1" range("A3").Select Selection.Copy range("A4:A1908").Select ActiveSheet.Paste Columns("A:A").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub
microsoft_excel/macros/create_sequence.txt · Last modified: 2021/08/04 14:07 by peter