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
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
olorin

Could you actually explain, in words, what you are trying to achieve?
 

olorin

Board Regular
Joined
Feb 7, 2005
Messages
87
I would like the cells "A6 to D6" to change colour if the number in B4 drops below 500
Thanx for your time
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
Could you not use Format>Conditional Formatting... for this?
 

olorin

Board Regular
Joined
Feb 7, 2005
Messages
87

ADVERTISEMENT

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
 

Todd Bardoni

Well-known Member
Joined
Aug 29, 2002
Messages
3,042
Select your range, go to Format/Conditional formatting and I think the rest will be self explanatory.

Post back if your need additional help.
 

olorin

Board Regular
Joined
Feb 7, 2005
Messages
87
Brilliant !!!
Like everything.... it's SIMPLE when you know how
Thank you both for your advice
 

Watch MrExcel Video

Forum statistics

Threads
1,122,207
Messages
5,594,841
Members
413,944
Latest member
3xc3ln00b

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
Top