+ Reply to Thread
Results 1 to 10 of 10

Conditional formatting with colour

  1. #1
    Registered User
    Join Date
    01-02-2008
    Posts
    23

    Conditional formatting with colour

    Hi,

    Im trying to create a stock database based on a colour traffic light system. I have 2 set columns, the first is 'recommended stock' the second is 'actual stock'
    When you paste in your requirements into the 3rd column it subtracts it from the acutal stock which tells you how much your recommended stock is short by.
    What ive got as well is any stock above 1+ shows up in green (this needs changing - see below), anything below 0 shows up in red. What im struggling with is i want a rule that reads the recommended stock level, then flags it up yellow when the actual stock levels drop to 10% of full stock.

    Can anyone advise on how to use the conditional formatting if that is the way.

    Thanks

    Lee

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting with colour

    =B1<=C1/10 where b1 is actual stock and c1 is full stock
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    01-02-2008
    Posts
    23

    Re: Conditional formatting with colour

    Martin,

    Thanks for that, I put the formula in using the relevant cells and it does change the colour correctly when the figure goes less than 10%. One thing i might not have made clear was that this is a list of items, not just one. When i tested your formula not only did the current item go yellow, the whole list went yellow, this must be because i selected the whole lot of items rather than just one line. Do i have to apply this rule to each line individually (Theres 200+ items!)

    Thanks

    Lee

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting with colour

    it would if cell in c was blank/0
    try
    =AND($B1<=$C1/10,$C1<>0)
    select range of cells you want to apply formatting to
    then format/conditional format/formula is/
    it will auto adjust for each row
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-02-2008
    Posts
    23

    Re: Conditional formatting with colour

    Hi,

    I set off with the best will to amend the formula, despite nearly half a day playing with it i dont feel much closer! I have attached my file in its original form, if you could spare a little time and correct my errors id much appreciate it! Note that i cant change the layout of the sheet because i need to paste data to the right hand side.

    Thanks
    Lee
    Attached Files Attached Files

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting with colour

    try this then
    green if ok yellow if <=10% (note if you only have 7 items you will never get less than 10 % if you use whole numbers)
    red if 0
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-02-2008
    Posts
    23

    Re: Conditional formatting with colour

    Martin I could kiss you, (but ill not, wouldnt want to scar you for life!)

    One last thing, when the figures go below 0 ie into minus numbers, is there a an alteration I can make so the minus figures appear in red instead of yellow?

    Thanks
    Lee

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting with colour

    change condition 2 to
    =AND($E14<=0,$D14<>0)
    ammendment
    to cope with items <10

    try instead
    condition 1 red =AND($E14<=0,$D14<>0)
    condition 2 yellow =OR(AND($D14<10,$E14=1),AND($E14<=$D14/10,$D14<>0))
    condition 3 green =AND($E14>$D14/10,OR($D14<>0,$D14<>""))
    this will also go yellow if recommended stock is less than 10 and quants in stock =1
    Last edited by martindwilson; 07-23-2009 at 08:44 AM.

  9. #9
    Registered User
    Join Date
    01-02-2008
    Posts
    23

    Re: Conditional formatting with colour

    Hi Martin,

    You gave me great help with this. Ive been trialling it over the last couple of weeks and theres a couple of small changes to make which i (sadly!) cant do without some help.

    On the attachment, Im trying to get the 'reduced stock' column to be green if the 'reduced stock' figure is above the 'minimum stock' value.
    If the 'reduced stock' hits the 'minimum stock' value or below then it would be yellow.
    If the 'reduced stock' hits zero or minus figures then it would be red.

    I think ive managed to confuse myself into an early grave!

    Thanks all!
    Lee
    Attached Files Attached Files

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional formatting with colour

    is that in addition to whats already there? or just
    =$F14=$D14 yellow
    =$F14<=0

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1