Create new worksheet for each unique value in a list

This quick script will go down column A of a tab named ‘Data’ and for each unique value it finds, it will create a worksheet with that name and then for each occurrence of the value in the list it will populate the new sheet line by line with the data alongside the value in columns B – G.

Application.ScreenUpdating = False

TM = Now()

'Find the lastrow in the main worksheet
With Worksheets("Data")
lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With

'This bit adds a new sheet for each FE it recognises, using the error trap to not create it if it's already there
For fe = 2 To lastrow

'Where FE Name is empty, create a NULL entry so as to not error
If Worksheets("Data").Range("A" & fe) = "" Then Worksheets("Data").Range("A" & fe) = "NULL"

'Need to build each sheet with the FE exceptions if any
'Again, loop down the Sheet1 tab and grab FE name from F and if BI > 0 then scan across and fire the info into the FE tab
'in the structured manner