• Conditional formatting for Top 5 numbers (Excel 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Conditional formatting for Top 5 numbers (Excel 2003)

    Author
    Topic
    #453426

    Can I use conditional formatting to shade the top 5 values of a column bright green or does it have to be a macro? thanks for the help.

    Viewing 1 reply thread
    Author
    Replies
    • #1122854

      Let’s say that the values are in A1:A100.
      Select this range.
      Select Format | Conditional Formatting…
      The first dropdown box should say “Cell Value Is” (the default setting).
      The second dropdown box should say “greater than or equal to”.
      Enter the following formula in the box next to it:

      =LARGE($A$1:$A$100,5)

      Click Format… and specify the formatting that you want to apply to the top 5.
      Click OK twice.

      • #1122855

        ah, yes.. thanks very much

      • #1122859

        Would this have worked? If the column contained duplicate numbers, would one way be preferable to another?
        cheers

        • #1122860

          That would have worked too. RANK and LARGE treat duplicate values the same way – if there are two cells with rank 5, both will be colored.

          • #1123480

            What if I don’t want to include 100% in the test. I tried =if(B5=”100%”,b5,large(b6:b21))

            but it didn’t work

            • #1123483

              Let’s say again that the range is A1:A100.
              Select A1:A100, A1 is the active cell within the selection.
              Select Format | Conditional Formatting…
              Select Formula Is from the first dropdown.
              Enter the following formula in the box next to it:

              =AND(A1>=LARGE($A$1:$A$100,5),A1100%))

              Click Format… to specify the desired formatting.

    • #1122858

      Hi There

      You could do it with a hidden column, let’s assume you have the numbers in cells A1:A7. In Cell B1 type =RANK(A1,$A$1:$A$7) and copy down to B7

      Highlight A1:A7 and use the following formula is =B1<=5, choose your formatting.

      I have attached an example of above

    Viewing 1 reply thread
    Reply To: Conditional formatting for Top 5 numbers (Excel 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: