How to lock one cell out of three?

rangel

New Member
Joined
Feb 22, 2018
Messages
5
Hi,
First let me thank you for taking the time to read this thread.
I am very new in excel, I have 3 cells (A1, A2, A3) and I would like to know if it is possible to lock one out of the three when two have data. for example;
If I have A1="any number" and A3="any number" I want A2 to be locked/grey out. If I have A2="any number" and A3="any number" I want A1 to be locked.
any help will be greatly appreciated, Thanks in advance!!
 
Re: Help Please! How to lock one cell out of three?

thank you so much sir!!

Change the 15 to 3. If you want to see all of the Color Index values you can choose from, copy/paste this code into the VB editor's Immediate Window (press CTRL+G if you don't see it)...

For X = 1 To 56: Cells(X, "A").Interior.ColorIndex = X: Next

and hit the Enter key... all of the possible ColorIndex colors will be shown in Column A of the active sheet... find a color you like and replace the 15 in my code with row number for that color.
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,226,114
Messages
6,189,051
Members
453,522
Latest member
Seeker2025

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