Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Ading color to difrent cells

Hi everybody
I have a column that contains diferent time intervals and I want t
make a macro or VBA to give to each diferent time interval diferen
color

Exampl
18:00-18:1
18:00-18:1
18:10-18:2

The "18:00-18:10" should be in one colo
The "18:10-18:20" should be in another color

thank
--------
Message sent via www.excelforums.com
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Ading color to difrent cells

Hi,
activecell.interior.colorindex = 5 'red

copy this code into an blank xl file to find all of the
color indexes
Sub macGetColors()

Sheets("Sheet1").Select
Range("B2").Select
Set ci = Range("A1")
ci.Value = 1
Set c = Range("B2")
Do Until ci 56
Set c2 = c.Offset(1, 0)
Set cnum = c.Offset(0, 1)
c.Interior.ColorIndex = ci.Value
c.Offset(0, 1) = ci.Value
ci.Value = ci.Value + 1
Set c = c2
c.Select
Loop

End Sub

-----Original Message-----
Hi everybody,
I have a column that contains diferent time intervals and

I want to
make a macro or VBA to give to each diferent time

interval diferent
color.

Example
18:00-18:10
18:00-18:10
18:10-18:20

The "18:00-18:10" should be in one color
The "18:10-18:20" should be in another color.

thanks
---------
Message sent via www.excelforums.com
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Ading color to difrent cells

Thank you
I will try it at onc
--------
Message sent via www.excelforums.com
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to color automatically color code sums in cells kuroitenpi Charts and Charting in Excel 1 November 29th 06 03:16 AM
How do I apply color in cells ..color now shown only in print prev bonadimi Excel Worksheet Functions 1 April 25th 06 07:34 PM
HOW TO UPDATE 1 WORKSHEET FROM 2 DIFRENT USERS j.c.montebello Excel Worksheet Functions 0 February 20th 06 11:26 PM
Excel 2003 will not display color fonts or color fill cells DaveC Excel Worksheet Functions 1 April 11th 05 04:38 PM
My excel 2003 wont let me fill cells with color or color the tabs. trizog New Users to Excel 2 February 22nd 05 06:43 PM


All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"