Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Change text color of specific date range by macro in Excel

Hello,

in a worksheet (or preferably entire workbook) is it possible to run a
macro, for example, that looks for entries up to a specific date and changes
the text to a different color, after this does the same to other entries
using another color, etc. and how would such a macro look like?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Change text color of specific date range by macro in Excel

Morgan,

I would use a do while loop that goes through your data looking for specific
dates.
I believe either of the items below will work for changing the text color
withing the cell

ActiveSheet.Cells(row, column).Select
Selection.Font.ColorIndex = 3
or
ActiveSheet.Cells(row,column).Font.ColorIndex = 3

This changes the background color of the cell

ActiveSheet.Cells(row, column).Interior.ColorIndex = 6

Hopefully, this will get you started.'

Jeff






ActiveSheet.Cells(row, 3).Interior.ColorIndex = 6



"Morgan LeFay" wrote:

Hello,

in a worksheet (or preferably entire workbook) is it possible to run a
macro, for example, that looks for entries up to a specific date and changes
the text to a different color, after this does the same to other entries
using another color, etc. and how would such a macro look like?

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 do I change Font color specific text jlr Excel Discussion (Misc queries) 1 May 6th 10 08:19 PM
Change color of text if date is overdue Lynora Excel Worksheet Functions 2 January 23rd 09 09:57 PM
Change color of specific text within a cell? [email protected] Excel Programming 1 July 13th 06 05:28 PM
count by specific text color in range of cell Tii99 Excel Discussion (Misc queries) 2 April 4th 06 09:58 AM
HOW TO USE A FORMULA TO CHANGE CELL COLOR ACCORDING TO DATE RANGE. terry Excel Worksheet Functions 2 December 27th 04 04:07 AM


All times are GMT +1. The time now is 10:27 PM.

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"