Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VB and Excel

Hi all,

can someone help me find code for highlighting 3 conditions - entire
row interior grey - and 1 when a date is passed to highlight the font
bold red, entire row again?

Also, I need to set a reminder to appear on the first day of every
month when the workbook starts up.

Any help appreciated! :)

Doo

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default VB and Excel

Have a look at conditional formatting before you decide on a code solution:
http://www.contextures.com/xlCondFormat01.html

HTH. Best wishes Harald

skrev i melding
ups.com...
Hi all,

can someone help me find code for highlighting 3 conditions - entire
row interior grey - and 1 when a date is passed to highlight the font
bold red, entire row again?

Also, I need to set a reminder to appear on the first day of every
month when the workbook starts up.

Any help appreciated! :)

Doo



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB and Excel

Try using:
Range(Cells(StartRow, StartColumn), Cells(EndRow, EndColumn)).Select

(StartRow, StartColumn, EndRow & EndColumn must all be numerical. If
the range is only on one row, StartRow = EndRow.)


wrote:
Amendment-

Instead of highlighting the entire row.. how can i highlight a range of
cells?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VB and Excel

Thanks folks but i need to highlight more than 3 conditions so it's
gonna have to be code.

I've got this so far:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "L3"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("B3:X3")) Is Nothing Then
With Target
Select Case .Value
Case "condition 1": Range("B3:X3").Interior.ColorIndex
= 15
Case "condition 2": Range("B3:X3").Interior.ColorIndex
= 35
Case "", "condition3":
Range("B3:X3").Interior.ColorIndex = 0
Case "condition 4": Range("B3:X3").Interior.ColorIndex
= 0
Case "condition 5": Range("B3:X3").Interior.ColorIndex
= 0


End Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

but this only works for one row. Does any one know how to modify it so
it applies to more than 1? Also, i still need to hightlight the row if
a date passes....

Harald Staff wrote:
Have a look at conditional formatting before you decide on a code solution:
http://www.contextures.com/xlCondFormat01.html

HTH. Best wishes Harald

skrev i melding
ups.com...
Hi all,

can someone help me find code for highlighting 3 conditions - entire
row interior grey - and 1 when a date is passed to highlight the font
bold red, entire row again?

Also, I need to set a reminder to appear on the first day of every
month when the workbook starts up.

Any help appreciated! :)

Doo




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VB and Excel

ooo, n how can i hide my email address like u guys? :P


wrote:
Thanks folks but i need to highlight more than 3 conditions so it's
gonna have to be code.

I've got this so far:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "L3"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("B3:X3")) Is Nothing Then
With Target
Select Case .Value
Case "condition 1": Range("B3:X3").Interior.ColorIndex
= 15
Case "condition 2": Range("B3:X3").Interior.ColorIndex
= 35
Case "", "condition3":
Range("B3:X3").Interior.ColorIndex = 0
Case "condition 4": Range("B3:X3").Interior.ColorIndex
= 0
Case "condition 5": Range("B3:X3").Interior.ColorIndex
= 0


End Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

but this only works for one row. Does any one know how to modify it so
it applies to more than 1? Also, i still need to hightlight the row if
a date passes....

Harald Staff wrote:
Have a look at conditional formatting before you decide on a code solution:
http://www.contextures.com/xlCondFormat01.html

HTH. Best wishes Harald

skrev i melding
ups.com...
Hi all,

can someone help me find code for highlighting 3 conditions - entire
row interior grey - and 1 when a date is passed to highlight the font
bold red, entire row again?

Also, I need to set a reminder to appear on the first day of every
month when the workbook starts up.

Any help appreciated! :)

Doo


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default VB and Excel

How many conditions do you need ? Don't expect your users to immediately
understand what your 8 different colors/color combinations are trying to
tell them. Some things make sense on the drawing board only.

HTH. Best wishes Harald


skrev i melding
oups.com...
Thanks folks but i need to highlight more than 3 conditions so it's
gonna have to be code.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default VB and Excel

I work with cases that can each be at a different status. Some statuses
can be considered cleared. These are the ones i am highlighting. I also
need to highlight them when a set date passes to prompt action to be
taken.

The reminder at workbook/ exel startup is to remind them to archive the
cleared cases.

This formatting will make working these cases a lot easier.


Harald Staff wrote:
How many conditions do you need ? Don't expect your users to immediately
understand what your 8 different colors/color combinations are trying to
tell them. Some things make sense on the drawing board only.

HTH. Best wishes Harald


skrev i melding
oups.com...
Thanks folks but i need to highlight more than 3 conditions so it's
gonna have to be code.


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



All times are GMT +1. The time now is 04:06 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"