Hello, could some one please help modify the code as shown below so that in column A of worksheet: Data to Text I need an AutoFill from cell A1 to the last row. The value in cell A1 needs to be: 1
If there are more than 1 records then I need an AutoFill from cell A1 to the last row. However, the value in cell A1 needs to be 1, value in cell A2 needs to be 2, value in cell A3 needs to be 3 etc...
Any assistance is greatly appreciated.
Kind regards,
Chris 
Sub Data_to_Text()
'
' Data to Text Macro
' Macro recorded 9/02/2010
'
'
Dim myRange As Range
Dim lr As Long
Set myRange = Selection
Sheets("Data").Select
For Each cell In myRange
Range(cell.Address).Value = cell.Value
Next cell
Selection.Copy
Sheets("Data to Text").Select
ActiveSheet.Paste
Columns("A:A").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight
ActiveCell.FormulaR1C1 = "1"
Range("A2").Select
ActiveCell.FormulaR1C1 = "2"
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range("A1:A2").Select
Range(Cells(lr, "a"), Cells(lr, "a")). _
AutoFill Range(Cells(lr, "a"), Cells(lr + 2, "a"))
End Sub
Bookmarks