hi.
try this.
Sub copy_cols_based_on_header()
Dim SourceWB As Workbook, HeadWS As Worksheet
Dim HeadRange As Range, Heads()
Dim LastHead As Long, j As Long
With Application
.ScreenUpdating = False
.DisplayAlerts = False
.Calculation = xlCalculationManual
End With
Set SourceWB = ThisWorkbook
Set HeadWS = SourceWB.Worksheets("Header Map")
With HeadWS
LastHead = .Cells(.Rows.Count, 1).End(xlUp).Row
Set HeadRange = .Range("A2:A" & LastHead)
ReDim Heads(LastHead - 2) '-1 for header row in header map and -1 for 0 based arrary
Heads = HeadRange.Value
End With
SourceWB.Worksheets("Source File").Copy
With ActiveSheet
'.Cells.UnMerge 'uncomment this line if you want merged cells to be unmerged
HeadRow = .Columns(1).Find("Brand Title").Row
.Rows("1:" & HeadRow - 1).EntireRow.Delete
For j = .Cells(1, .Columns.Count).End(xlToLeft).Column To 1 Step -1
If IsError(Application.Match(.Cells(1, j), Heads, False)) Then .Columns(j).Delete
Next
HeadRange.Offset(, 1).Copy
.Range("A1").PasteSpecial Paste:=xlPasteAll, Transpose:=True
End With
ActiveWorkbook.SaveAs SourceWB.Path & "\DestinationFile.xlsm", 52 'change file path and name to suit your requirement
With Application
.CutCopyMode = False
.Calculation = xlCalculationAutomatic
End With
End Sub