error frustration

olorin

Board Regular
Joined
Feb 7, 2005
Messages
87
Ok all you Xperts out there;
Those of you that know, will know what I am trying to do from the following script.....

Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("B4")
If Target.Count > 500 Then Exit Sub
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Target.Count <= 500 Then
Range("A6:D6").Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
Range("B4").Select
End If
End Sub

As I am VERY new to Xcel I would appreciate any help or suggestions to enlighten me in my quest to get my learning curve back on an upward trend.
Also, I feel that I am speaking for the Silent Majority here, when I say how much we appreciate the time given, and tips divulged, by all of you who post here regularly with your eXpertise.
Thanx
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
olorin

Could you actually explain, in words, what you are trying to achieve?
 
Upvote 0
I would like the cells "A6 to D6" to change colour if the number in B4 drops below 500
Thanx for your time
 
Upvote 0
Could you not use Format>Conditional Formatting... for this?
 
Upvote 0
I suppose I could if i knew what you meant... :)) but I'll look it up in the help files and try and work it out....though any advice would be gratefully recieved :)
thanx again
 
Upvote 0
Select your range, go to Format/Conditional formatting and I think the rest will be self explanatory.

Post back if your need additional help.
 
Upvote 0
Brilliant !!!
Like everything.... it's SIMPLE when you know how
Thank you both for your advice
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top