How to insert a column in excel based on a certain column name

Where should I write/execute this code exactly ?