PDA

View Full Version : Conditional Outline Borders Based on Criteria



trouble
02-06-2020, 12:16 PM
Hi All,

First time poster but I've never been so stuck before.:doh:

I want to go from this to this:

2593825939

So if the value in column B is 0, I want a thick red border around all X values in a row. If the value in column B is 1 or 2, I want a thick black border. Other column B values already have borders using conditional formula, but conditional formatting will not support thick borders, hence me needing to turn to my old nemesis: VBA (!) I'm using Excel 2016.

Sample workbook:

25940

Any help massively ​appreciated!

p45cal
02-06-2020, 12:35 PM
Supply a workbook to save us copying out your picture to experiment with code.

On your pictures, all the Xs are in contiguous cells in the same row, will there ever be non-contiguous Xs in the same row?

trouble
02-06-2020, 01:12 PM
Workbook supplied!


Supply a workbook to save us copying out your picture to experiment with code.

On your pictures, all the Xs are in contiguous cells in the same row, will there ever be non-contiguous Xs in the same row?

No, no non-contiguous Xs in the same row, though some individual Xs.

p45cal
02-06-2020, 01:53 PM
See attached.

trouble
02-06-2020, 03:15 PM
genius - thank you!!