Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Color to figures within the result of a formula

Status
Not open for further replies.

LGMan

MIS
Aug 27, 2003
233
GB
Hi carrying on from a thread that I started on the Microsoft Office forum hoping CFs might help.

I have a formula that pulls data from a table such as a Team Name and a result figure in order of high to low results, I would like to colour code the result figure so that results greater than or equal to 95% are green and results less than 95% are red.
here is my formula in cell F6

=VLOOKUP(1,A6:D10,2,0)&" ("&TEXT(VLOOKUP(1,A6:D10,4,0),"0.00")&"%), "&VLOOKUP(2,A6:D10,2,0)&" ("&TEXT(VLOOKUP(2,A6:D10,4,0),"0.00")&"%), "&VLOOKUP(3,A6:D10,2,0)&" ("&TEXT(VLOOKUP(3,A6:D10,4,0),"0.00")&"%), "&VLOOKUP(4,A6:D10,2,0)&" ("&TEXT(VLOOKUP(4,A6:D10,4,0),"0.00")&"%) & "&VLOOKUP(5,A6:D10,2,0)&" ("&TEXT(VLOOKUP(5,A6:D10,4,0),"0.00")&"%) "
So the result looks like this

North ([green]96.00%[/green]), South ([green]95.00%[/green]), West ([red]94.00%[/red]), North ([red]93.00%[/red]) & Central ([red]92.00%[/red])

The table consists of Team Names in B6:B10 and Results in D6:D10. A6:A10 contains a Rank high to low, from 1 to 5.

Is there a way to add the color coding via VBA. If it's not possible to apply colors to the formula in F6, then I could easily copy and paste as values into G6, if applying color is more straight forward to a text string.

Thanks
 
Hi,

This is not forum707 as previously advised.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top