Q: Reorder of csv file by header names I receive an exported CSV file with several columns daily.  There are only three columns I am interested in, and I presently have a script that extracts these three columns into a new file.  These three columns must be in a certain order before sending it to an outside vendor to continue the processing - ColumnA, ColumnN and ColumnO (these each have their own unique name in the first line (header)).  
The problem is the exported form is very inconsistent, quite often ColumnN and ColumnP are reversed, so that the script I am using will put the wrong data in the wrong position.  I am looking for a script that will allow me to order the columns based on the header name, not on the column letter.  This way, even if the exported file reverses these two columns, they will still be in their proper position after my script extracts and orders them. 
The exporting process is out of my hands, and that particular vendor has told us that the inconsistency of the exported file will not change.  This process needs to be totally automated, no interaction is possible.  

A: The easy way, delete the columns you don't need, in this example columns B,C,M are deleted
Sub deleteColumns()
    Range("B:B,C:C,M:M").Select
    Selection.Delete Shift:=xlToLeft
End Sub

of course duplicate the file before
