VBA for conditional formatting

afrobea_r

Board Regular
Joined
Aug 16, 2015
Messages
76
Dear Excel Community,

I currently have a sheet with data resembling this:

Plan Days
Intended 13
Unintended 12
Intended 14
Intended 15
Intended 16
Unintended 8

<colgroup><col><col></colgroup><tbody>
</tbody>

As the conditional formatting function does not allow application of thick coloured borders, what kind of macro can I use to dynamically apply a thick red border to those cells in the days column only if their corresponding cell value in the plan column is 'unintended'? It must be dynamic as the row data may increase from time to time and certain values within existing rows will also change over time depending on info I have.

I have been stuck for some time. Any help is appreciated!! Thank you in advance!

Best Regards,
stuck
 
The last code I supplied should do that already, although it won't recognise text values.
If you modify it to recognise text values as well as numerical values, then it will pick up any cell with a formula that returns "".
Unfortunately I know of no way round this, other than removing the formulae

Thank you Sir its all good really appreciate your help on all this. What if I have certain cells that contain a date value: eg (
31-Dec-17 to 3-Feb-18). How can I then trigger a conditional to copy only cells with these values?



<tbody>
</tbody>
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
The last code I supplied should do that already, although it won't recognise text values.
If you modify it to recognise text values as well as numerical values, then it will pick up any cell with a formula that returns "".
Unfortunately I know of no way round this, other than removing the formulae

Its all good Sir, thank you very much for your help on this. Really appreciate it. Regarding this issue, I have found a workaround, which is to change the "" into "NA" and then have another code to delete the cells with the NAs. That should solve the issue.

Have a great week ahead
 
Upvote 0
Glad you've sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,815
Messages
6,127,035
Members
449,355
Latest member
g wiggle

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