Adding a vertical line in conditional formatting data bars at 100%

kopp123

New Member
Joined
Apr 7, 2014
Messages
9
Hello, I have a budgeting sheet where I'd like to show a vertical line against some progress bars at a value other than zero. In particular, I'd like to highlight where budgets are at more than 100%. It looks like conditional formatting can only handle that if the value you're targeting is zero.

I'm currently just drawing a vertical line at the 100% mark, but would like to do it dynamically if possible (I've forgotten to update it occasionally). Any ideas on how to accomplish this?

a0msp2t.png


Delta: vertical line at 0 using conditional formatting
Percent: vertical line at 100 using vertical line
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
There is a way to do this. I am experimenting with some code. Your (manual) line has a name and can be handled as a shape in VBA. So you can check the highest value in the range (here 215) and then knowing the width of the cell calculate where the line needs to be positioned. Then you can use the .Left property of the shape to position it correctly. You can use the .Left property of the cell to help, to accommodate changes to the worksheet. I'll get back next week somewhere
 
Upvote 0
Thanks, not sure this is still on your radar or not, but I think that's more work than I need at the moment. Appreciate your help though!
 
Upvote 0
it had slipped my mind. if I have some time I'll get back to it
 
Upvote 0
Oh, this has been deeply hidden in my inbox. Sorry if I have kept you waiting.

One quick solution is to add an extra column with the formula 1- %budget, and then do the conditional formatting there:
1590581727757.png


You can then set the colour of the text to white, fontsize to 1, allignment to left, to get:

1590582010730.png


Would that be useful?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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