See example Master spreadsheet:
I would like to create a new tab for each unique item in column (A) (i.e. new tab for 'AGHT', 'AJDI', 'ASTRO', etc).
I would then like to group all the rows that match in column A and move them (with columns B, C and D) to their respective new tab created. So all the rows that have 'Astro' in column A and move them tot he tab names 'Astro'
One solution I've worked on that works great is a macro that creates a new tab for each unique field in column A. See code below:
Sub CreateSheets()
Dim rng As Range
Dim cell As Range
On Error GoTo Errorhandling
Set rng = Application.InputBox(Prompt:="Select cell range:", _
Title:="Create sheets", _
Default:=Selection.Address, Type:=8)
For Each cell In rng
If cell <> "" Then
Sheets.Add.Name = cell
End If
Next cell
Errorhandling:
End Sub
What I am having trouble with is copying all the rows that match what's in column A and moving them to their new respective tab.
Or is there a better way of doing this rather than the solution I've started working on?
Also would this be able to update new tabs and move new rows as the master spreadsheet is updated?
I would like to create a new tab for each unique item in column (A) (i.e. new tab for 'AGHT', 'AJDI', 'ASTRO', etc).
I would then like to group all the rows that match in column A and move them (with columns B, C and D) to their respective new tab created. So all the rows that have 'Astro' in column A and move them tot he tab names 'Astro'
One solution I've worked on that works great is a macro that creates a new tab for each unique field in column A. See code below:
Sub CreateSheets()
Dim rng As Range
Dim cell As Range
On Error GoTo Errorhandling
Set rng = Application.InputBox(Prompt:="Select cell range:", _
Title:="Create sheets", _
Default:=Selection.Address, Type:=8)
For Each cell In rng
If cell <> "" Then
Sheets.Add.Name = cell
End If
Next cell
Errorhandling:
End Sub
What I am having trouble with is copying all the rows that match what's in column A and moving them to their new respective tab.
Or is there a better way of doing this rather than the solution I've started working on?
Also would this be able to update new tabs and move new rows as the master spreadsheet is updated?