title: How to CTRL SHIFT ENTER on VBA Formula
body: <p>It's supposed to be an array formula, so that's why I try to insert {} there. but i encountered an error when i run it. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>lastrow = ThisWorkbook.Sheets("Sheet2").Range("A" &amp; Rows.Count).End(xlUp).Row
  
  If lastrow &gt; 1 Then
  
       Sheets("Sheet2").Range("C3:C" &amp; lastrow).Value = _
            "=CONCATENATE(MIN(IF(B3:B251=B3,A3:A251)),""-"",MAX(IF(B3:B251=B3,A3:A251)))"
  
  End If
  </code></pre>