Making cells conditionally inaccesible

berkeleydave

New Member
Joined
Sep 2, 2011
Messages
3
Hello,

I was hoping someone would be to help me with the following: I am working with an attendance sheet for prospective after-school program participants. Every sheet has the full list of all of the potential students. On the very first of the worksheets, I will mark their attendance or note of they are either a) not enrolled or b) not participating. What I would like is for all of the subsequent worksheets to respond to me entering "Not Enrolled" or "Not Participating" in the first worksheet by filling the row that that student's name is in with a particular color and making all of the cells corresponding to that row inaccessible (e.g. the rows are filled black and the cells are blank and cannot be altered from being blank). Is this possible?

Thanks in advance!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi berkeleydave,

What you describe is easily done via a VBA macro that colors and locks the rows corresponding to the attendance note, then protects the worksheets. Unfortunately, I don't have time to code this for you right now (and would need a bit more information from you anyway), but rest assured that this is not a difficult problem and that someone with a thorough knowledge of Excel and VBA could knock it out in probably less than an hour.

Damon
 
Upvote 0
You can do this with names.
If the column with the values is column A of sheet1.
Select cell A1 and define a name

Name: Attendence RefersTo: =Sheet1!$A1

Then cells with the conditional format
=OR((Attendence="not enrolled"),(Attendence="not participating"))
will be colored appropriatly.

The user will not be permitted to enter data into cells with the validation formula
=AND((Attendence<>"not enrolled"),(Attendence<>"not participating"))
 
Upvote 0
Thank you! That validation basically did the trick.

The next step for me is to figure out how to achieve the same thing without allowing the user to enter the cell. What I mean is that while the validation you suggested won't allow any entry to remain in the cell, it still allows the user to enter text into the cell (and then get an error message). I am guessing this is some sort of conditional cell protection which I saw some other threads on.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
Lawrenceiow

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