title: Multiple colors in one cell while appending values with VBA
body: <p>I am using the following code to append values within a single cell by checking the values of other cells.  What I want to do next is change the font color of the value I am appending, and keep any existing font colors.  Ex:  Value of a1 is "".  I then append the value "abc " in green.  I then append the value "123 " in red.  I want the cell to show:</p>
  
  <p>[(red)(green)]</p>
  
  <p>["abc 123 "]</p>
  
  <p>My code:  </p>
  
  <pre><code>If Cells(ActiveCell.Row, 6).Value = "Control" Then
       bit_value = "(" &amp; Application.WorksheetFunction.VLookup(Cells(ActiveCell.Row, 5).Value, Range("Output"), total_bits + 3, False) &amp; ")" &amp; high_low &amp; "  "
       Cells(ActiveCell.Row, 7).Value = Cells(ActiveCell.Row, 7).Value &amp; bit_value
  End If
  </code></pre>
  
  <p>My Data:</p>
  
  <pre><code>504003  Control     2   11  55  12  21  00010001    01010101    00010010    00100001
  504003  Control     2   11  55  12  20  00010001    01010101    00010010    00100000
  </code></pre>
  
  <p><strong>UPDATE:</strong>
  By utilizing Tim's code, I arrived at the changes below, and it does exactly what I needed.</p>
  
  <pre><code>bitColor = IIf(ActiveCell.Value = 0, RGB(255, 0, 0), RGB(0, 0, 255))
  If Cells(ActiveCell.Row, 6).Value = "Control" Then
       With Cells(ActiveCell.Row, 7)
            bit_value = "(" &amp; Application.WorksheetFunction.VLookup(Cells(Active _
                 Cell.Row, 5).Value,Range("Output"), total_bits + 3, False) &amp; ")"
            AddValue Cells(ActiveCell.Row, 7), bit_value, bitColor
       End With
  End If
  </code></pre>