Thanks a lot for that, I didn't thnik is possible but I needed to try.
 
Thanks
 
Pawel


________________________________
From: Vabz <v...@vabs.in>
To: excel-macros@googlegroups.com 
Cc: pawel lupinski <lupins...@yahoo.com> 
Sent: Friday, September 21, 2012 2:01 PM
Subject: $$Excel-Macros$$ Re: color coding of REPT function


Hi 

Its not possible i guess..

But you can do with UDF..

for multiple fonts/colours etc in a single cell you use the 
cells(x,y).characters(start,length).font function

The following code makes the first 10 characters BOLD and colour 56 and the 
rest not bold and colour 12

With Cells(row,col).Characters(start:=1, Length:=10).Font
.FontStyle = "Bold"
.ColorIndex = 56
End With

With Cells(col,row).Characters(start:=11, Length:=180).Font
.FontStyle = "Normal"
.ColorIndex = 12
End With 


Cheers..

Rgds//Vabs

On Friday, September 21, 2012 2:22:21 PM UTC+5:30, lupinskip wrote: 
Hi All
>I wonder if its possible to have color coding on "REPT" function. e.g. I'd 
>like to have 30 "g"s in red, 45 "g"s in green and 25 "g"s in orange. If you 
>have any ideas I'll be appreciated.
>Pawel
>PS. I don't want to use a graph for it.-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel
 
FORUM RULES (1120+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 
 
6) Jobs posting is not allowed.
 
7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.


Reply via email to