title: VBA - Update values in an array with For Each statement
body: <p>I'm trying yo update my arrays full of numerical values, once I know which Regional settings are set on the computer.</p>
  
  <p>I used this code :</p>
  
  <pre><code>If Application.International(xlCountrySetting) &lt;&gt; 33 Then
      For Each x In Country
          x = Replace(x, ",", ".")
      Next x
  Else
      For Each x In Country
          x = Replace(x, ".", ",")
      Next x
  End If
  </code></pre>
  
  <p>When I debug, I see that <strong><code>x</code> has been changed</strong>, but later on in code, the <strong>values in Array haven't been modified</strong>.</p>
  
  <p>I know I can use <code>For i = LBound(Country,1) to UBound(Country,1)</code> but I was wondering if there is a <strong>way to do this with the <code>For Each</code> statement</strong>.</p>
  
  <p>Any idea?</p>