[VBA]
Option Explicit
Public Sub ProcessData()
Dim IB as string
IB=Inputbox("Enter Column Letter To Use", "Code Column Adjustment")
Const TEST_COLUMN As String = IB
Dim i As Long
Dim LastRow As Long
Dim NextRow As Long
Dim this As Worksheet
Dim sh As Worksheet
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
Set this = ActiveSheet
With this
LastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = 2 To LastRow
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(.Cells(i, "A").Value)
On Error Goto 0
If sh Is Nothing Then
Worksheets.Add after:=Worksheets(Worksheets.Count)
Set sh = ActiveSheet
sh.Name = .Cells(i, "A").Value
.Rows(1).Copy sh.Range("A1")
End If
NextRow = sh.Cells(sh.Rows.Count, "A").End(xlUp).Row + 1
.Rows(i).Copy sh.Cells(NextRow, "A")
Next i
End With
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub
[/VBA]when you run this code now a box will pop up asking you fro which column!