Conditional Formatting Surrounding Cells

rhogsett

New Member
Joined
Jul 23, 2014
Messages
16
Hello All,

Thank you in advance for any and all your assistance.

I am having difficulty figuring out how to highlight the surround cells of a cell containing text. I have a spreadsheet where an "X" is entered into various cells within a large range (ie. $C$3:$J$37). I would like to conditionally format the range $C$3:$J$37 so that anytime an "X" is entered within that range, the surrounding cells become filled/highlighted.

ABCDEFG
1
2FILLFILLFILL
3FILLFILLFILL
4FILLXFILL
5FILLFILLFILL
6FILLFILLFILL
7

<tbody>
</tbody>

I have spent way to much time trying to figure this out on my own and thought it best to reach out and ask for help.

Any assistance is greatly appreciated!

Thank you,

RG
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
anytime an "X" is entered within that range, the surrounding cells become filled/highlighted.
How exactly are you defining "surrounding"? From your picture, it looks like you are including columns one column away from the selected cells, but up to 2 rows above and below the selected cell.
 
Upvote 0
Highlight B2:K38 > Conditional Formatting > New Rule > Use a formula

=OR(A1="X",B1="X",C1="X",A2="X",C2="X",A3="X",B3="X",C3="X")

Format: Fill color of your choice > OK > OK
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,098
Members
449,205
Latest member
ralemanygarcia

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