Try this. I've commented it to help you understand it:
Public Sub CopyToRawData()
Dim sourceSheet As Worksheet
Dim targetSheet As Worksheet
Dim lastRow As Long
Dim nextRow As Long
Dim lastCol As Long
Dim foundCol As Variant
Dim thisCol As Long
' Set up the sheets
Set sourceSheet = Sheets("FY19")
Set targetSheet = Sheets("Raw_Data")
' Find the next row to put the data and also the last column on row 3
With targetSheet
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
lastCol = .Cells(3, .Columns.Count).End(xlToLeft).Column
End With
' Find the last row of data
With sourceSheet
lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
' Process all columns
For thisCol = 1 To lastCol
' Make sure there's a column heading there
If targetSheet.Cells(3, thisCol).Value <> "" Then
' Look for this column in the source sheet
foundCol = Application.Match(targetSheet.Cells(3, thisCol).Value, sourceSheet.Range("4:4"), 0)
' If we found the column then copy the data from it
If Not IsError(foundCol) Then
sourceSheet.Range(sourceSheet.Cells(5, foundCol), sourceSheet.Cells(lastRow, foundCol)).Copy targetSheet.Cells(nextRow, thisCol)
End If
End If
Next thisCol
End Sub
WBD
Bookmarks