title: Add Row Based on Sheet Name
body: <p>I'm a little stuck at the moment on the problem - I have a workaround but it's very inefficient and also very time consuming to code.</p>
  
  <p>I have a selection of worksheets and I would like to add a different header row to each of these sheets based on the sheet name.</p>
  
  <p>I would like to have a worksheet containing a selection of header rows - see <a href="https://i.stack.imgur.com/2zYWk.png" rel="nofollow noreferrer">Selection of Header Rows</a></p>
  
  <p>Then, for example, if the worksheets = A00 - apply the copy in the corresponding Header Row from the Selection worksheet.</p>
  
  <p>This is my current solution - as you can see it is very inefficient and time-consuming</p>
  
  <pre><code>For Each myWorksheet In Worksheets
      If myWorksheet.Name = "A00" Then
          Sheets("A00").Cells(1).Resize(1, 5).Value = Array("ORGANISATION_ID", "FILE_TYPE", "CREATION_DATE", "CREATION_TIME", "GENERATION_NUMBER")
      End If
      If myWorksheet.Name = "Z99" Then
          Sheets("Z99").Cells(1).Resize(1, 1).Value = Array("RECORD_COUNT")
      End If
      If myWorksheet.Name = "I56" Then
          Sheets("I56").Cells(1).Resize(1, 26).Value = Array("ORGANISATION_SHORT_CODE", "INVOICE_NUMBER", "INVOICE_TYPE_CODE", "BILLING_YEAR", "BILLING_MONTH", "INVOICE_AMOUNT", "INVOICE_VAT_AMOUNT", "INVOICE_GROSS_TOTAL", "PAYMENT_DUE_DATE", "VAT_CHARGED_TO_NWO", "VAT_CHARGED_TO_SHIPPER", "INVOICE_TAX_POINT_DATE", "NWO_VAT_ REGISTRATION_NUMBER", "NWO_BANK_SORT_CODE", "NWO_BANK_ACCOUNT_NUMBER", "NWO_BANK_ACCOUNT_NAME", "ISH_VAT_REGISTRATION_NUMBER", "ISH_BANK_ACCOUNT_NUMBER", "ISH_BANK_SORT_CODE", "NWO_SHORT_CODE", "NWO_VAT_REGISTRATION_NAME", "NWO_ADDRESS_LINE_1", "NWO_ADDRESS_LINE_2", "NWO_ADDRESS_LINE_3", "NWO_ADDRESS_LINE_4", "FILE_NAME")
      End If
      If myWorksheet.Name = "I05" Then
          Sheets("I05").Cells(1).Resize(1, 2).Value = Array("ISC_LINE_1_TEXT", "ISC_LINE_2_TEXT")
      End If
      If myWorksheet.Name = "I57" Then
          Sheets("I57").Cells(1).Resize(1, 8).Value = Array("INVOICE_ITEM_REFERENCE_NUMBER", "INCURRED_DATE", "CHARGE TYPE CODE", "QUANTITY", "UNIT_TYPE", "RATE", "INVOICE_ITEM_AMOUNT", "ANCILLARY_INVOICE_COMMENTS")
      End If
      If myWorksheet.Name = "K12" Then
          Sheets("K12").Cells(1).Resize(1, 4).Value = Array("GAS_ACT_OWNER", "CURRENT_METER_ASSET_MANAGER", "PROSPECTIVE_METER_ASSET_MANAGER", "PROSPECTIVE_MAM_EFFECTIVE_DATE")
      End If
  Next myWorksheet
  </code></pre>
  
  <p>Any help with this would be much appreciated.</p>