title: Conditional formatting getting error in VBA
body: <p>I have a conditional formatting from VBA code for a column which applies when there is a change of value.</p>
  <p>The column is actually a Price column, So when the price value is entered,based on some formulas i apply my condition. It is working when the decimal separator is &quot;.&quot; (DOT) (For Example: 1.323)</p>
  <p><strong>But when the decimal separator is &quot;,&quot; in the system setting. I'm getting error when adding formula for conditional formatting</strong> ..</p>
  <p>**</p>
  <ul>
  <li>Code below..</li>
  </ul>
  <p>**</p>
  <pre><code>   Dim MyRange As Range
      Set MyRange =Target.Address
  
      formula_1 = &quot;=IF(OR($AV&quot; &amp; Target.Cells.row &amp; &quot;=&quot;&quot;No&quot;&quot;,AND($AV&quot; &amp; Target.Cells.row &amp; &quot;=&quot;&quot;Yes&quot;&quot;)),IF(Y&quot; &amp; Target.Cells.row &amp; &quot;=AJ&quot; &amp; Target.Cells.row &amp; &quot;,FALSE,TRUE),FALSE)&quot;
      formula_2 = &quot;=0&quot;
      formula_3 = &quot;=IF($N&quot; &amp; Target.Cells.row &amp; &quot;=&quot;&quot;EUR&quot;&quot;,TRUE,FALSE)&quot;
      
      MyRange.Interior.Color = RGB(250, 191, 143)
      MyRange.FormatConditions.Delete
      MyRange.FormatConditions.Add Type:=xlExpression, Formula1:=formula_1
      MyRange.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, Formula1:=formula_2
      MyRange.FormatConditions.Add Type:=xlExpression, Formula1:=formula_3
      
      MyRange.FormatConditions(1).Interior.Color = RGB(255, 192, 0)
      MyRange.FormatConditions(1).SetFirstPriority
      MyRange.FormatConditions(1).StopIfTrue = False
      
      MyRange.FormatConditions(2).StopIfTrue = True
      MyRange.FormatConditions(2).NumberFormat = &quot;##0.00&quot;
  
      MyRange.FormatConditions(3).StopIfTrue = True
      MyRange.FormatConditions(3).NumberFormat = &quot;[$EUR] #,##0.0000&quot;
      
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ARcGu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ARcGu.png" alt="enter image description here" /></a></p>
  <p>Error triggered in line
  <code>&quot;MyRange.FormatConditions.Add Type:=xlExpression, Formula1:=formula_1&quot;</code> <strong>Error code: 5</strong></p>