Set value for range of cells!

K

Kim-Anh Tran

How do I change this to set target range for rows from 46:54?
I appreciate any help!
Kim-Anh

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 46 And Target.Column = 20 Then
Select Case Target.Formula
Case "x"
'allow this
Case ""
'allow this
Case Else
'reset to nothing
Target.Formula = ""
End Select
End If
End Su
 
N

Norman Jones

Hi Kim-Anh Tran ,

Try:
If Target.Row > 45 And Target.Row < 55 _
And Target.Column = 20 Then
 
T

Tim Zych

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, _
Range(Cells(46, 20), Cells(54, 20))) Is Nothing Then
'within range
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top