Happy to help.
Scruffy/ugly code is fine so long as YOU understand it. I will say that properly indented code, although makes no difference to the running of it, does make it much easier to read when it comes to debugging.
It would appear that some of your code was put together with the macro recorder. Whilst it's a great tool it often produces unnecessarily lengthy code.
For example, you have something like 80 lines of code to add borders, inside and out, to two ranges. The result of those 80 lines can be accomplished by using just one line:
Range("A1:K2,A4:F29").Borders.LineStyle = xlContinuous
Below is a slightly rewritten version of your code to make things a little shorter. It could possibly be shortened further but difficult to do anymore without seeing your workbook to tell what some of the lines are doing.
Sub ExportDataCreateDatabase()
Dim Cl As Range
Dim Ws As Worksheet
Dim WSTest As Worksheet
Application.ScreenUpdating = False
Set Ws = Worksheets("DATABASE")
For Each Cl In Ws.Range("A2", Ws.Range("A" & Rows.Count).End(xlUp))
Set WSTest = Nothing
On Error Resume Next
Set WSTest = ThisWorkbook.Sheets(Cl.Text)
On Error GoTo 0
If WSTest Is Nothing Then
Sheets.Add(, Sheets(Sheets.Count)).Name = Cl.Text
With Sheets(Cl.Text)
Ws.Hyperlinks.Add Cl, "", .Range("A1").Address(0, 0, , 1)
Ws.Range("A1:K1").Copy .Range("A1:G1")
.Hyperlinks.Add .Range("M1"), "", "MAINPAGE!A1", , "MAINPAGE"
.Hyperlinks.Add .Range("N1"), "", "DATABASE!A1", , "DATABASE"
.Range("A2:K2").Formula = "=" & Cl.Offset(, 0).Address(0, 0, , 1)
.Range("A4:F4").Value = Array("Date", "Disposition", "Added", "Removed", "Issued", "Surplus")
.Range("A1:F1").Copy
.Range("A4:F4").PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
Columns("A:O").EntireColumn.AutoFit
Range("A1:K2,A4:F29").Borders.LineStyle = xlContinuous
Rows("5:5").Select
ActiveWindow.FreezePanes = True
End With
With Range("A5:F125,M1:N1")
.Locked = False
.FormulaHidden = False
End With
With ActiveSheet
.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
.EnableSelection = xlUnlockedCells
End With
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
End With
End If
Next Cl
End Sub
Good luck with learning to code. It's an interesting journey and there's a whole forum of people here to help you along if/when you get stuck. 
BSB
Bookmarks