Cell Auto Code

R

Randy

Hello. I have a little formula/code of sorts that I am trying to tweak. The
code basically places an "X'" in a cell no matter what the user types into
the cell. Work great by the way! Now I want to make it even more difficult!!!
lol...

What I am trying to do is get this code to basically place an "X" in cell
G25, an "L" in cell G26, a "M" in cell G27, etc...no matter what a user might
type into the cell.

This is what I have to work with. If anyone has any suggestions I would
greatly appreciate. I thank you in advance for you time!

Private Sub Worksheet_Change_0(ByVal Target As Excel.Range)
Const sINPUTS As String = "G25, G26, G27"
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range(sINPUTS), .Cells) Is Nothing Then
If Not IsEmpty(.Value) Then
On Error Resume Next
Application.EnableEvents = False
.Value = "2"
Application.EnableEvents = True
On Error GoTo 0
End If
End If
End With
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