title: How can I automate populating an array using a named range on a specific worksheet?
body: <p>The named range is <code>SheetNames</code>, on a worksheet named <code>Consolidation</code>, cell B3 to B101 and the array is <code>Sheets(Array(&quot;Sheet1&quot;, &quot;Sheet2&quot;)).Select</code>:</p>
  <pre><code>Sub Insert_Formula()
      Dim ws As Worksheet
      Application.ScreenUpdating = False
      Sheets(Array(&quot;Sheet1&quot;, &quot;Sheet2&quot;)).Select
      
      For Each ws In ActiveWindow.SelectedSheets
          ws.Range(&quot;F3:F50&quot;).Formula = &quot;=SUMIFS(Jul!$K:$K,Jul!$H:$H,$C$1,Jul!$J:$J,$C3)&quot;
      Next ws
    
      Application.ScreenUpdating = True 
  End Sub
  </code></pre>