LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Member
 
Posts: 57
Default Combine 2 worksheet change events

I have a worksheet that I want to place 2 worksheet change events on. i know that I cannot do this and that I have to combine them into one. I just cannot get my head around how I do that. Is there an idiots guide anywhere (idiot being the operative term here ;-)

firstly I have this to make text in certain cells upper case

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then
Exit Sub
End If
On Error GoTo ErrHandler:
If Not Application.Intersect(Me.Range("E5:L5"), Target) Is Nothing Then
If IsNumeric(Target.Value) = False Then
Application.EnableEvents = False

Target.Value = StrConv(Target.Text, vbUpperCase)

Application.EnableEvents = True
End If
End If
ErrHandler:
Application.EnableEvents = True

then I have


Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer


If Not Intersect(Target, Range("G24:I24")) Is Nothing Then

Select Case Target

Case -1000 To 29

icolor = 3

Case 30 To 34

icolor = 45

Case 35 To 45

icolor = 4

Case 46 To 50

icolor = 45

Case 51 To 1000

icolor = 3

Case Else

'Whatever

End Select



Target.Interior.ColorIndex = icolor

End If


To give me extra conditional formatting for users of old excel versions.


Any input gratefully received

cheers
nobby
 
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 summarize dates of events to a new worksheet to count ho. me Excel Worksheet Functions 1 October 4th 07 11:39 PM
Cell change events Richard Excel Discussion (Misc queries) 2 May 16th 07 04:18 PM
IS THERE A WAY TO CLEAR WORKSHEET EVENTS USING ANOTHER MACRO Reha Excel Discussion (Misc queries) 4 December 11th 06 12:15 AM
Understand Workbook/Worksheet Events Zamdrist Excel Discussion (Misc queries) 4 August 10th 06 04:56 PM
Worksheet Events DCSwearingen Excel Discussion (Misc queries) 2 May 24th 06 10:42 PM


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

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"