Select one from options in several rows

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

kismaci

Thread Starter
Joined
Jan 21, 2013
Messages
1
Hi!

I've only getting know the macros, so it maybe a simple question.

I've got several questions in rows, and the answers could be selected from 3 options (A, B, C)

So it could be
Questions | A | B | C |
question1 | | | X |
question2 | | X | |
...

What I've managed to find (thanks to this forum ), how to add X with double clicks.
(http://forums.techguy.org/business-applications/535860-does-excel-have-onclick-functionality.html, thanks for Zack Barresse)

Code:
Option Explicit

Const MYRANGE As String = "D11:F11"

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Target.Cells.Count > 1 Then Exit Sub
    If Intersect(Target, Me.Range(MYRANGE)) Is Nothing Then Exit Sub
    Cancel = True
    If Target.Value = "" Then
        Target.Value = "X"
    Else
        Target.Value = ""
    End If
End Sub
How should/could I modify the code:
- to only have one X in one row in the ABC range (if they want to overwrite it, the new cell's value should be "X", the other's "")
- and do this in many rows? (not in the entire worksheet!)

Thanks in advance!
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top