Forum Discussion
vishnu4646
Sep 12, 2022Copper Contributor
MS Excel: Change colour of formula's output
I have a requirement to change the text of formula's output. I tried many ways however entire cell colour is getting change not specific text.
So the formula is like below, combination on text and multiple formula in one cell only:
="Total amount payable to "&LOOKUP(2,1/(NOT(ISBLANK(H:H))),H:H)&" is "&Total[[#Totals],[Actual]]
```
Text 1 : Total amount payable to
Formula 1. : LOOKUP(2,1/(NOT(ISBLANK(H:H)))
Text 2. : is
Formula 2. : Total[[#Totals],[Actual]]
```
Text 1 and Text 2 colour would be black and formula 1 and Formula 2 output should change to Green.
How we could achieve this?
4 Replies
Sort By
- OliverScheurichGold Contributor
This can (only ?) be done with Range.Characters(...,...).Font.Color in VBA.
- vishnu4646Copper ContributorOliverScheurich, do you have any reference link or example that I can refer?
- OliverScheurichGold Contributor
Range.Characters property (Excel) | Microsoft Docs
If i correctly understand this is your expected result: