Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default changing font colour of row when cell contains date

seems easy...and probably is.
(solution maybe possible through conditional formatting...but i don't
know how!may only be possible through VBA)

have a database that is 1000 rows long and 10 columns wide.
column 4 cells either contain a date or is blank.
the font of the database is red when the cell in column 4 is blank.
at present the user has to manually change the font colour of rows to
black after they have entered a date into cells in column 4.

can this font colour be automatically changed when a date is entered?

any help greatly appreciated

Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default changing font colour of row when cell contains date

Hi Jason,

can this font colour be automatically changed when a date is entered?


Yes, use the Formula Is option and enter this formula:

=NOT(ISBLANK(D1))

DO this with the entire column D selected and cell D1 as the active
cell.

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default changing font colour of row when cell contains date

Hi,

You could check the internet to see if OnEntry would help
you. It works something like this (this is just an
example of a change to an activecell):

Sub OnEntryOn()
ActiveSheet.OnEntry = "ChangeColor"
End Sub

Sub ChangeColor()
ActiveCell.Font.ColorIndex = 37
End Sub

Sub OnEntryOff()
ActiveSheet.OnEntry = ""
End Sub

Further programming could be added to do exactly what you
need.

Rick

-----Original Message-----
seems easy...and probably is.
(solution maybe possible through conditional

formatting...but i don't
know how!may only be possible through VBA)

have a database that is 1000 rows long and 10 columns

wide.
column 4 cells either contain a date or is blank.
the font of the database is red when the cell in column 4

is blank.
at present the user has to manually change the font

colour of rows to
black after they have entered a date into cells in column

4.

can this font colour be automatically changed when a date

is entered?

any help greatly appreciated

Jason
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default changing font colour of row when cell contains date

Jason,

Did you figure it out yet?

I had some more time today. There's other ways to write
this, but this is what came first to my mind.

Sub ColorsRed()
Rem: To Reset Colors
Dim Cel As Variant: Dim i As Integer

For Each Cel In Range("D1:D1000")
If IsEmpty(Cel) Then

For i = -3 To -1
Cel.Offset(0, i).Font.ColorIndex = 3 'Red
Next i
For i = 1 To 6
Cel.Offset(0, i).Font.ColorIndex = 3 'Red
Next i

Else

For i = -3 To -1
Cel.Offset(0, i).Font.ColorIndex =
xlAutomatic 'Black
Next i
For i = 1 To 6
Cel.Offset(0, i).Font.ColorIndex =
xlAutomatic 'Black
Next i

End If
Cel.Font.ColorIndex = 7 'Purple
Next Cel

End Sub

Sub OnEntryOnRev1()
ActiveSheet.OnEntry = "ChangeColorRev1"
End Sub

Sub ChangeColorRev1()
Dim i As Integer

For i = -3 To -1
ActiveCell.Offset(0, i).Font.ColorIndex = xlAutomatic
Next i

For i = 1 To 6
ActiveCell.Offset(0, i).Font.ColorIndex = xlAutomatic
Next i
End Sub

Sub OnEntryOffRev1()
ActiveSheet.OnEntry = ""
End Sub

I hope that helps.

Rick

-----Original Message-----
seems easy...and probably is.
(solution maybe possible through conditional

formatting...but i don't
know how!may only be possible through VBA)

have a database that is 1000 rows long and 10 columns

wide.
column 4 cells either contain a date or is blank.
the font of the database is red when the cell in column 4

is blank.
at present the user has to manually change the font

colour of rows to
black after they have entered a date into cells in column

4.

can this font colour be automatically changed when a date

is entered?

any help greatly appreciated

Jason
.

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
textBox font colour the same as cell font colour???????? Sophie Excel Discussion (Misc queries) 4 February 13th 09 10:15 AM
Changing font colour to red & orange DDD Excel Discussion (Misc queries) 1 February 1st 09 11:58 AM
Changing font colour depending on cell value RunRonnyRun Excel Worksheet Functions 1 October 27th 08 08:28 PM
Changing one cell colour by inserting date in another cell JohannM Excel Worksheet Functions 3 September 4th 06 07:42 PM
Changing font colour in some cells Di W New Users to Excel 4 March 12th 06 05:58 PM


All times are GMT +1. The time now is 08:25 PM.

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

About Us

"It's about Microsoft Excel"