title: If condition to check if content in cell is right aligned not working
body: <p>I have a data that is copied and pasted from a pdf file and then split using 'texttocolumns'. I use this data to extract specific information into another excel. All this is done using vba.</p>
  
  <p>As a part of this, I have the below code to check if contents in cell A12 (example) is right aligned. Although the content in the cell "appears" right aligned, the vba does not show the result as 'True'. </p>
  
  <pre><code>If Sheets("Test").Range("A12").HorizontalAlignment = xlRight Then
  ''Do something
  End if
  </code></pre>
  
  <p>Test data</p>
  
  <p><a href="https://i.stack.imgur.com/UCUwP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UCUwP.png" alt="Test data"></a></p>