How to grey and/or block out cells under a set of conditions

jinkies

New Member
Joined
Mar 12, 2024
Messages
1
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi! I have a spreadsheet that will be used to track data for multiple units and sometimes two of the units get combined. The spreadsheet will be shared, so I want it to be preset for anyone entering data. Would there be a way to grey out cells in a column based of a Y/N prompt? Example: If Y is entered in B2, how can I block data entry for C2,D2/entering N in B3, blocking E3?

1710265365408.png
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Welcome to the Board!

Yes, use Conditional Formatting.

Rule 1 (format columns C and D):
1. Select cells C2:D14
2. Go to Conditional Formatting
3. Select the New Rule option
4. Choose the "Use a formula to determine which cells to format" option
5. Enter the following formula:
Excel Formula:
=$B2="Y"
6. Click on the Format button
7. Go to the Fill tab
8. Select the gray color you desire
8. Click OK twice

Rule 2 (format column E):
1. Select cells E2:E14
2. Go to Conditional Formatting
3. Select the New Rule option
4. Choose the "Use a formula to determine which cells to format" option
5. Enter the following formula:
Excel Formula:
=$B2="N"
6. Click on the Format button
7. Go to the Fill tab
8. Select the gray color you desire
8. Click OK twice

This should do what you want.

1710266072199.png
 
Upvote 1

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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