title: VBA change cell's value if it has a user defined style
body: <p>I want to change all cells in Excel spreadsheet of specific, user defined style (let's say 'Beauty' style) to value "Beast". </p>
  
  <p><code>Sub BulkChangeValeOfStyle()
      Dim TheCell As Range
      For Each TheCell In ActiveSheet.UsedRange.Cells
          If TheCell.Style = "Beauty" Then
              TheCell.Value = "Beast"
          End If
      Next
  End Sub</code></p>
  
  <p>This code is too slow. I got lots of those Beauty cells scattered round the spreadsheet. Is it possible to make it like this:</p>
  
  <pre><code>ActiveSheet.AllCellsWithaStyle="Beauty".value="Beast"
  </code></pre>
  
  <p><b>Update</b>
  This is just an idea:
  <code>ActiveSheet.Cells.SpecialCells(xlCellTypeSameFormatConditions).Activate</code>
  or alternatively 
  <code>ActiveSheet.Cells.SpecialCells(xlCellTypeSameValidation).Activate</code></p>
  
  <p>but I do not know how to set up the criteria which determine <code>xlCellTypeSameFormatConditions</code>. Or criteria for <code>xlCellTypeSameValidation</code>. Anybody knows?</p>