ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Insert text depending on font colour (https://www.excelbanter.com/excel-discussion-misc-queries/230918-insert-text-depending-font-colour.html)

Tricia

Insert text depending on font colour
 
I have a list and was wondering how to do this:

I want to insert a certain word at the beginning of the paragraph in each
cell that has red font. A different word for blue font, yellow font etc. If
the font colour thing is no good, I could make the cell background different
colours.

:D

David Biddulph[_2_]

Insert text depending on font colour
 
You can't do this with a formula. It would have to be VBA.
http://xldynamic.com/source/xld.ColourCounter.html
http://www.cpearson.com/excel/colors.aspx
--
David Biddulph

Tricia wrote:
I have a list and was wondering how to do this:

I want to insert a certain word at the beginning of the paragraph in
each cell that has red font. A different word for blue font, yellow
font etc. If the font colour thing is no good, I could make the cell
background different colours.

D




JB

Insert text depending on font colour
 
With UDF

http://cjoint.com/?fpvoz8csOq

Function couleurFondTexte()
Application.Volatile
Select Case Range(Application.Caller.Address).Interior.ColorIn dex
Case 3
couleurFondTexte = "Red"
Case 4
couleurFondTexte = "Green"
Case 6
couleurFondTexte = "Yellow"
Case Else
couleurFondTexte = "???"
End Select
End Function

JB
http://boisgontierjacques.free.fr



On 15 mai, 05:32, Tricia wrote:
I have a list and was wondering how to do this:

I want to insert a certain word at the beginning of the paragraph in each
cell that has red font. *A different word for blue font, yellow font etc. *If
the font colour thing is no good, I could make the cell background different
colours.

:D




All times are GMT +1. The time now is 05:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com