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

kopp123

New Member
Joined
Apr 7, 2014
Messages
7
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?



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

sijpie

Well-known Member
Joined
Nov 1, 2008
Messages
3,524
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
 

kopp123

New Member
Joined
Apr 7, 2014
Messages
7
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!
 

sijpie

Well-known Member
Joined
Nov 1, 2008
Messages
3,524
it had slipped my mind. if I have some time I'll get back to it
 

Forum statistics

Threads
1,077,784
Messages
5,336,327
Members
399,076
Latest member
vullistax

Some videos you may like

This Week's Hot Topics

Top