Formatting part of a cell containing formula

Copper Contributor

I have data in cells A1 and B1. In C1, there is a formula concatenating together A1 and B1. I want the portion of C1 that comes from A1 to be a different color from the part coming from B1. Can I do this?

2 Replies

@SanfordL0 

This should be possible with the Range.Characters property in VBA like this:

.Range("C" & i).Characters(1, lengthA1).Font.Color = vbBlue

A1 and B1.JPG

@OliverScheurich 

But that won't work if the cells in column C contain formulas.