+ Reply to Thread
Results 1 to 9 of 9

Multiple Conditional Formating

  1. #1
    Mandeep Dhami
    Guest

    Multiple Conditional Formating

    Hi,

    First Query:

    I am preparing worksheet wherein I require 4 conditional formating, but only
    3 are available.
    Please could you help me have more then 3 conditional formating.

    Second Query:

    The formating goes by adding certain numbers/words in cell and the colour of
    the cell changes. I want whatever we enter in cell should not be visible but
    only the cell should get coloured as per colours assigned to that particular
    number or word.

    Cheers,
    Mandeep

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi Mandeep,

    As you say you are limited to 3 conditional formats but you also have the default format so you may be able to achieve what you want.

    If you want just a coloured cell you have two options. One is to format the cell purely on the result of another cell or you can set the font colour within the cell to be the same as the cell colour.

    HTH

    Ed

  3. #3
    Forum Contributor
    Join Date
    08-22-2005
    Location
    Denmark
    MS-Off Ver
    Excel 365
    Posts
    349
    I got some clever answers to the same question on march 8. around 1600 hrs.

    You can have only 3 different outputs + the default, but if you choose fomula in stead of cell vaule it is possible to write a logical expression that gives you the same output for several different conditions.

    Example - you want cell C4 to be red if the value is "Fail" or "Wrong":
    Put the cursor in C4
    Conditional formatting
    Choose formula to be =OR(C4="Fail";C4="Wrong")
    Choose the format to be red


    nsv
    Last edited by nsv; 03-15-2006 at 08:54 AM.

  4. #4
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293
    You also can specify a format for neagtive numbers, that can add one

    ---Glenn

  5. #5
    Mandeep Dhami
    Guest

    Re: Multiple Conditional Formating

    Thanks to all for your reply.
    I think I have not got what I required.

    In my spreadsheet I want four conditional formatings.
    If I enter:
    Number 1 in any cell the colour should change to Bright Green,
    Number 2 in any cell the colour should change to Yellow,
    Number 3 in any cell the colour should change to Gold,
    Number 4 in any cell the colour should change to Rose.

    What I want is that whenever I enter any numbers in any cell in any sequence
    the colour as per above should be filled in that particular cell.........but
    the value entered should not be displayed......for eg: if I enter number 2,
    the cell should change to colour Yellow but at the same time number 2 should
    not be visible in that cell.

    Cheers,
    Mandeep



    "gjcase" wrote:

    >
    > You also can specify a format for neagtive numbers, that can add one
    >
    > ---Glenn
    >
    >
    > --
    > gjcase
    > ------------------------------------------------------------------------
    > gjcase's Profile: http://www.excelforum.com/member.php...o&userid=26061
    > View this thread: http://www.excelforum.com/showthread...hreadid=522556
    >
    >


  6. #6
    Forum Contributor
    Join Date
    08-22-2005
    Location
    Denmark
    MS-Off Ver
    Excel 365
    Posts
    349
    In that case the conditional formatting can give you only three different colors. The fourth is the default ie. the color that applies to all other values in the cell.


    If you want the figure itself to be invisible in the cell then choose the same color for the font as for the background

  7. #7
    Mandeep Dhami
    Guest

    Re: Multiple Conditional Formating

    Thanks for the reply.

    The suggestion that you gave is which I am aware of. I was expecting that
    there should be some thing automation with some formula as there are many
    cells with the conditional formating and if as per the suggestion I will
    start changing the font colour to that of cell colour it will take hell lot
    of time and which will not be worth.

    Do let me know if there is solution in preparing macro for the same, it can
    also have more then 3 conditionla formating also.

    Cheers,
    Mandeep


    "nsv" wrote:

    >
    > In that case the conditional formatting can give you only three
    > different colors. The fourth is the default ie. the color that applies
    > to all other values in the cell.
    >
    >
    > If you want the figure itself to be invisible in the cell then choose
    > the same color for the font as for the background
    >
    >
    > --
    > nsv
    > ------------------------------------------------------------------------
    > nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
    > View this thread: http://www.excelforum.com/showthread...hreadid=522556
    >
    >


  8. #8
    Worthy
    Guest

    Re: Multiple Conditional Formating

    This might be too late, but if you still require multiple conditional
    formatting, try the following function ...

    Function RAG(StrtRow As Integer, EndRow As Integer, StrtCol As Integer,
    EndCol As Integer)
    Dim c, r

    c = StrtCol
    Do Until c > EndCol

    r = StrtRow
    Do Until r > EndRow

    If Not IsNumeric(Cells(r, c).Value) Or Cells(r, c).Value = "" Then
    Cells(r, c).Interior.ColorIndex = xlNone
    Cells(r, c).Font.ColorIndex = 0
    ElseIf IsNumeric(Cells(r, c).Value) Then
    If Cells(r, c).Value = 1 Then
    Cells(r, c).Interior.ColorIndex = 3
    Cells(r, c).Font.ColorIndex = 3
    ElseIf Cells(r, c).Value = 2 Then
    Cells(r, c).Interior.ColorIndex = 19
    Cells(r, c).Font.ColorIndex = 19
    ElseIf Cells(r, c).Value = 3 Then
    Cells(r, c).Interior.ColorIndex = 24
    Cells(r, c).Font.ColorIndex = 24
    ElseIf Cells(r, c).Value = 4 Then
    Cells(r, c).Interior.ColorIndex = 35
    Cells(r, c).Font.ColorIndex = 35
    End If


    End If
    r = r + 1
    Loop
    c = c + 1
    Loop


    End Function


    Hope this helps

    --
    Paul


    "Mandeep Dhami" wrote:

    > Thanks for the reply.
    >
    > The suggestion that you gave is which I am aware of. I was expecting that
    > there should be some thing automation with some formula as there are many
    > cells with the conditional formating and if as per the suggestion I will
    > start changing the font colour to that of cell colour it will take hell lot
    > of time and which will not be worth.
    >
    > Do let me know if there is solution in preparing macro for the same, it can
    > also have more then 3 conditionla formating also.
    >
    > Cheers,
    > Mandeep
    >
    >
    > "nsv" wrote:
    >
    > >
    > > In that case the conditional formatting can give you only three
    > > different colors. The fourth is the default ie. the color that applies
    > > to all other values in the cell.
    > >
    > >
    > > If you want the figure itself to be invisible in the cell then choose
    > > the same color for the font as for the background
    > >
    > >
    > > --
    > > nsv
    > > ------------------------------------------------------------------------
    > > nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
    > > View this thread: http://www.excelforum.com/showthread...hreadid=522556
    > >
    > >


  9. #9
    Mandeep Dhami
    Guest

    Re: Multiple Conditional Formating

    Thanks Worthy.........its never to late to learn new things.
    I don't understand where to enter this macro.
    If you could just send me the file with this macro it will be of gr8 help.
    My mail id is [email protected]

    Cheers,
    Mandeep


    "Worthy" wrote:

    > This might be too late, but if you still require multiple conditional
    > formatting, try the following function ...
    >
    > Function RAG(StrtRow As Integer, EndRow As Integer, StrtCol As Integer,
    > EndCol As Integer)
    > Dim c, r
    >
    > c = StrtCol
    > Do Until c > EndCol
    >
    > r = StrtRow
    > Do Until r > EndRow
    >
    > If Not IsNumeric(Cells(r, c).Value) Or Cells(r, c).Value = "" Then
    > Cells(r, c).Interior.ColorIndex = xlNone
    > Cells(r, c).Font.ColorIndex = 0
    > ElseIf IsNumeric(Cells(r, c).Value) Then
    > If Cells(r, c).Value = 1 Then
    > Cells(r, c).Interior.ColorIndex = 3
    > Cells(r, c).Font.ColorIndex = 3
    > ElseIf Cells(r, c).Value = 2 Then
    > Cells(r, c).Interior.ColorIndex = 19
    > Cells(r, c).Font.ColorIndex = 19
    > ElseIf Cells(r, c).Value = 3 Then
    > Cells(r, c).Interior.ColorIndex = 24
    > Cells(r, c).Font.ColorIndex = 24
    > ElseIf Cells(r, c).Value = 4 Then
    > Cells(r, c).Interior.ColorIndex = 35
    > Cells(r, c).Font.ColorIndex = 35
    > End If
    >
    >
    > End If
    > r = r + 1
    > Loop
    > c = c + 1
    > Loop
    >
    >
    > End Function
    >
    >
    > Hope this helps
    >
    > --
    > Paul
    >
    >
    > "Mandeep Dhami" wrote:
    >
    > > Thanks for the reply.
    > >
    > > The suggestion that you gave is which I am aware of. I was expecting that
    > > there should be some thing automation with some formula as there are many
    > > cells with the conditional formating and if as per the suggestion I will
    > > start changing the font colour to that of cell colour it will take hell lot
    > > of time and which will not be worth.
    > >
    > > Do let me know if there is solution in preparing macro for the same, it can
    > > also have more then 3 conditionla formating also.
    > >
    > > Cheers,
    > > Mandeep
    > >
    > >
    > > "nsv" wrote:
    > >
    > > >
    > > > In that case the conditional formatting can give you only three
    > > > different colors. The fourth is the default ie. the color that applies
    > > > to all other values in the cell.
    > > >
    > > >
    > > > If you want the figure itself to be invisible in the cell then choose
    > > > the same color for the font as for the background
    > > >
    > > >
    > > > --
    > > > nsv
    > > > ------------------------------------------------------------------------
    > > > nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
    > > > View this thread: http://www.excelforum.com/showthread...hreadid=522556
    > > >
    > > >


+ 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