+ Reply to Thread
Results 1 to 19 of 19

Conditional Formatting - more than 3

  1. #1
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21

    Conditional Formatting - more than 3

    In a column, there are 4 option for each cell -
    "PAYMENT DUE"
    "PAID"
    "UNDERPAID BY..."
    'OVERPAID BY..."

    These are filled in by a formula

    I would like to make them 4 different colours but excel only allows 3 options

  2. #2
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Option 1

    Use a macros :


    Option 2

    The forth option will be white in color....( no formatting )

  3. #3
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    How does a macros work?

  4. #4
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Try the below code..

    Modify it as per your need

    Please Login or Register  to view this content.
    Last edited by Shijesh Kumar; 12-09-2008 at 09:37 AM.

  5. #5
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    ok will try it
    thank you

  6. #6
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671
    The Fourth Coloe does not necessarily need to be white
    The forth option will be white in color....( no formatting )
    . It can be any fill colour. So for your four options I would recommend not to use the macro.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  7. #7
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    How would I get the fourth colour to not be white?

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Format the cell whatever color you want. Conditional formatting will override it.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    That would mean doing each one?
    For a list of several hundred it may take some time?

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    ???

    Select all the cells and apply the default color at the same time.

  11. #11
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    ok well ill have to do that unless there is a way whereby as soon as i type PAYMENT DUE, the box turns red

  12. #12
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    See the attachment,

    it is based on macros..
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    The way that works is exactly perfect

    just my problem is i dont even know what a macro is, so I'm having difficulties applying your function to my document.

    i right-clicked on sheet 1 and selected view code and then pasted , then closed it all but nothing happens
    I'm sure I must be doing something wrong
    Last edited by Tziggy; 12-09-2008 at 03:09 PM.

  14. #14
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Did u save the file before closing ALL.

  15. #15
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    Yeah did that and i changed the column to the column with the staements.

    If i write, for e.g PAYMENT DUE in that column it does change to red so in that way it works perfect, but it seems that the problem is that these statements are based on a formula because when i copy the formula from the top cell down to the bottom, the words appear but not the colour coding

    also as soon as i copy, i get this

    Run time error 13
    type mismatch

    One thing i didnt mention is that underpaid and overpaid have values next to them i.e UNDERPAID BY R100.00. these values always change for each one
    Last edited by Tziggy; 12-09-2008 at 02:46 PM.

  16. #16
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    The best what I can think in this situation is ..
    copy the below code as u did previously..

    Place the cursor on the first cell of column where you want the formatting.

    And then click on

    Tool --> Macros

    Then Select xformat and then click on run


    Please Login or Register  to view this content.
    Last edited by Shijesh Kumar; 12-09-2008 at 03:25 PM.

  17. #17
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    Thanks for the help

    THat works fine for everything that is already written in i.e all the PAID turn green, etc but anything that comes in after does not change

    also for e.g the top one is paid and turns green,then i drag that formula down and everything becomes green

  18. #18
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Yes, I know this



    What you need to do is after you copy your formula..

    You have to click on Tool --> Macros and select xformat and click Run..

    This you have to do each time you copy and change the detail


    Otherwise you have to write another macors to automate this...

  19. #19
    Registered User
    Join Date
    12-08-2008
    Location
    South Africa
    Posts
    21
    ok thanks for your help

+ 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