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,527
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,527
it had slipped my mind. if I have some time I'll get back to it
 

Forum statistics

Threads
1,082,295
Messages
5,364,362
Members
400,792
Latest member
Dxmiian

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top