Create a border around the adjacent cell if a conditon exists.

Jim123

New Member
Joined
Mar 5, 2011
Messages
4
I have 50 values in cell “A1” like P200, 925-1, AN110 etc. I would like cell “B1“ to automatically create a border around the entire cell if cell “A1” contains one of 10 pre-selected values. This is all to get a signature box to show on selected rows when the sheet is printed. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I know I can make an if statement in “B1” and then use conditional formatting based on the value in “B1” to create a border around the cell. But is this the simplest way or am I taking the long way around the barn?<o:p></o:p>
<o:p></o:p>
Thanks for any advice<o:p></o:p>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
It does seem like a simple way if it is working for you...

Another method would be to create a list of the 10 pre-selected values somewhere an call it _List.

Then in B1 with conditional formatting use =MATCH(A1,_List,0) and set your format as desired.

Don't know if this is better, but it eliminates the If statements.

You could even make the named range dynamic so if you add any value it would automatically be added to the list.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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