how to only pick and show one cell

Sergio

New Member
Joined
Dec 2, 2005
Messages
22
I have a questionnaire and 3 possible answers. How can I make sure only one answer is selected Column B, C, and D they are a yes, no, maybe answer (columns).
I will add a value to each answer so at the end I can use the formula provided by an user in my last post
Thanks
Alex
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0
Sergio, why are you having your team select one of three columns? With a data validation you can have a drop down limited to the three options.

1695311141712.png


1695310981191.png
 

Attachments

  • 1695311009732.png
    1695311009732.png
    31.2 KB · Views: 2
Upvote 0
the problem is that i might need to change the format of the file and it will be more difficult if i start using drop menu. The questionnaire have sections and what i am trying to do is to create a streetlight code.
For Example if all of the questions are Yes that means they are all green, if one of the questions is a NO that mean is red and of course one question is Maybe that mean the section will be yellow.
Some people are selecting two options and it make it difficult to quantify
 

Attachments

  • NOTES.jpg
    NOTES.jpg
    35.6 KB · Views: 1
Upvote 0
You could use additional conditional formatting that will alert the user that more than one cell is populated.
Or
You can use VBA to delete the value in one cell if one of the others is populated. I am not an expert on VBA so I cannot contribute that.
 
Upvote 0
Start by unlocking all the cells in your sheet. Next copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Change the password (in red) to suit your needs. Close the code window to return to your sheet. Enter an "x" in any cell in B:D and press the ENTER key. The other adjacent cells will be locked.
Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.CountLarge > 1 Then Exit Sub
    If Intersect(Target, Range("B:D")) Is Nothing Then Exit Sub
    ActiveSheet.Unprotect "MyPassword"
    Select Case Target.Column
        Case 2
            Target.Offset(, 1).Resize(, 2).Locked = True
        Case 3
            Target.Offset(, 1).Locked = True
            Target.Offset(, -1).Locked = True
        Case 4
            Target.Offset(, -2).Resize(, 2).Locked = True
    End Select
    With ActiveSheet
        .Protect "MyPassword"
        .EnableSelection = xlUnlockedCells
    End With
End Sub
 
Upvote 0
Thank you but the macro doesn't let me change my mind if I picked yes and then I want to change to No.
I am just looking to don't have the option to pick two values.... the Macro blocks the rest of the excel sheet and i do still have some stuff in different columns
Thanks
Sergio
 
Upvote 0
You have to start by unlocking all the sheets cells as I mentioned in my post if you want access to the other columns.
 
Upvote 0

Forum statistics

Threads
1,215,331
Messages
6,124,311
Members
449,152
Latest member
PressEscape

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