I want to disable a cell in excel based on another cell which contains alphanumeric values / no particular values can I get a formula which will work

Hint

New Member
Joined
Apr 9, 2021
Messages
3
Office Version
  1. 2013
Platform
  1. Windows
want to disable a cell in excel based on another cell. Can I get a formula which will work for this scenario using conditional formatting in excel
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You could use a custom data validation rule on the cell to be disabled.

A formula in the validation rule that equates to TRUE will allow you to enter anything into the cell, a rule that equates to anything else will prevent the cell from being changed.
 
Upvote 0
You could use a custom data validation rule on the cell to be disabled.

A formula in the validation rule that equates to TRUE will allow you to enter anything into the cell, a rule that equates to anything else will prevent the cell from being changed.
But I want to make it disabled by applying some fill on cell , so conditional formatting will be appropriate for it .
Example :if c and d column has any values ,d and e column should be disabled by greying out .
 
Upvote 0
You can grey out the cell by using a simple formula rule, =A1<>"" applied to any cell will apply the rule when A1 contains data, this can be applied anywhere it is needed.

Conditional formatting will not disable the cell, it will only change the colour. People will still be able to change what is in the cell, if you want to stop them from changing the cell altogether then you will need to use data validation, for that the rule would be =A1=""

Note that you can use both on the same cell in order to disable entry and grey out. Anything that was already in the cell before the rule was enforced would remain hidden in the cell, to delete it would require vba.
 
Upvote 0
Solution
You can grey out the cell by using a simple formula rule, =A1<>"" applied to any cell will apply the rule when A1 contains data, this can be applied anywhere it is needed.

Conditional formatting will not disable the cell, it will only change the colour. People will still be able to change what is in the cell, if you want to stop them from changing the cell altogether then you will need to use data validation, for that the rule would be =A1=""

Note that you can use both on the same cell in order to disable entry and grey out. Anything that was already in the cell before the rule was enforced would remain hidden in the cell, to delete it would require vba.
Thank you ,it worked
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,581
Members
449,089
Latest member
Motoracer88

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