Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community

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


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


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