how do i disable row/column from yes/no validation list box?

manjumukesh

New Member
Joined
Jan 14, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have produced formula in two columns, one cell in other column set to a validation list containing 'Yes,No'.

If the user selects 'no' for a particular cell, i want two formula column disable.
If the user selects 'yes' for a particular cell, formula's column will remain active.

Please can you help me?

Mukesh
 

Attachments

  • For disable.JPG
    For disable.JPG
    35.2 KB · Views: 2

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
hi manjumukesh,

Welcome to the Board.

I'm not sure I get your query entirely. Please elaborate it a bit further as there are a number of questions in regards to the same.
for instance,
1. How excel would interpret which cell the user has selected, while selecting "No" from the data validation list?
2. What do you mean by column disable? is it to Hide the Column?

I would suggest providing part of your worksheet along with your query for better understanding. You can use xl2bb addin to do so, or make use of any free file sharing service like dropbox or onedrive.
 
Upvote 0
hi manjumukesh,

Welcome to the Board.

I'm not sure I get your query entirely. Please elaborate it a bit further as there are a number of questions in regards to the same.
for instance,
1. How excel would interpret which cell the user has selected, while selecting "No" from the data validation list?
2. What do you mean by column disable? is it to Hide the Column?

I would suggest providing part of your worksheet along with your query for better understanding. You can use xl2bb addin to do so, or make use of any free file sharing service like dropbox or onedrive.
Yes i want hide the column, when i select option 'no'.
 
Upvote 0
In that case, how about using a command button instead of using Yes/No in a data validation list.
If so, then create a form button on your worksheet and use the below code in a standard module.

VBA Code:
Sub Button5_Click()
s = ActiveCell.Column
ans = MsgBox("Do you want to hide selected column?", vbYesNoCancel + vbQuestion)
    If ans = vbYes Then
        Columns(s).EntireColumn.Hidden = True
    End If
End Sub

hth....
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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