Databars length on one key color on another

fiammdin

New Member
Joined
Oct 9, 2016
Messages
3
Hi there,

im confused with Excel at the Moment. :(


im trying to get databars which length are based on the value within the cell but the Color is depending from another keyfigure.

Any idea on how to solve that?

AchivementStatusStatus bar
10R
45G
80Y

<tbody>
</tbody>


Here the first databar should be 10 Long and red, the second should be 45 Long but green and the third should be 80 but yellow.

thx a lot to all.

cheers
 

RickXL

MrExcel MVP
Joined
Sep 9, 2013
Messages
4,314
Hi and welcome to the MrExcel Message Board.

Excel does not do what you want directly. However, we can be devious. :)

Use four rules and not just one. The first rule will fill the whole cell with red if the value in column B is "R". It will fill the whole cell with green if the value in column B is "G" and, you guessed, it will fill the whole cell with yellow if the value in column B is "Y".

That is the first three rules and if you apply them D2 will be all red, D3 will be all green and D4 will be all yellow.

Now we can apply a DataBar.
Set the value of the cell in column D to be 100-"the value in A".
Now create a DataBar that is white and works from Right to Left.
Final touch, check "Show Bar Only" to hide the numbers.


Regards,
 
Last edited:

fiammdin

New Member
Joined
Oct 9, 2016
Messages
3
Thats so smart :)
I will try it asap, but it sounds so logic that i hate myself to not have thought about it.

Thx a lot
 

RickXL

MrExcel MVP
Joined
Sep 9, 2013
Messages
4,314
You're welcome.

Sometimes, when you can't take No for an answer, you just have to outsmart it. :)


Regards,
 

Forum statistics

Threads
1,081,560
Messages
5,359,604
Members
400,538
Latest member
leon_oscar

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top