+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Formatting the cells on the basis of their values

  1. #1
    Registered User
    Join Date
    06-16-2012
    Location
    Ahmedabad, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Post Formatting the cells on the basis of their values

    I am using MS Office 2007. I want to format selected cells in a column that their background changes on entering value in it. For example, I have a sheet containing some data. Now I want that cell A2's colour turns red if a value of it is lower than cell A1, cell A2's colour turns green if its value is greater than A1 and no change appears if both the cells' value is same.

    It is possible through Conditional Formatting, But I want to do it in entire row or more than 1 cell at a time which I select. I am attaching how I want the excel to work with cells coloured.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Formatting the cells on the basis of their values

    Hello
    In your example file, select cells A2:A15, then apply the following conditional formatting formulas:

    For Red:
    =AND(A2<A1,A2<>"")

    For Green:
    =A2>A1

    Hope this helps.
    DBY

  3. #3
    Registered User
    Join Date
    06-16-2012
    Location
    Ahmedabad, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Formatting the cells on the basis of their values

    Quote Originally Posted by DBY View Post
    Hello
    In your example file, select cells A2:A15, then apply the following conditional formatting formulas:

    For Red:
    =AND(A2<A1,A2<>"")

    For Green:
    =A2>A1

    Hope this helps.
    DBY


    Thanks for your support. But I am not getting it clearly. Can u pls elaborate it. It will be a great help if u can explain it in a bit detail.

    Thanks & Regards,

    Dhwanit

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Formatting the cells on the basis of their values

    Hello
    No problem. In your example file, select the cell range A2:A15.

    Go to Conditional Formatting on the Ribbon.
    Select New Rule.
    Select Use a formula to determine which cells to format.
    In the 'Format values where this formula is true:' enter:

    =AND(A2<A1,A2<>"")

    Click the Format button to set Format to Red.
    Click Ok.

    Repeat for Green format with:
    =A2>A1

    I've also attached an example file for you to look at.

    DBY

  5. #5
    Registered User
    Join Date
    06-16-2012
    Location
    Ahmedabad, India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Formatting the cells on the basis of their values

    Quote Originally Posted by DBY View Post
    Hello
    No problem. In your example file, select the cell range A2:A15.

    Go to Conditional Formatting on the Ribbon.
    Select New Rule.
    Select Use a formula to determine which cells to format.
    In the 'Format values where this formula is true:' enter:

    =AND(A2<A1,A2<>"")

    Click the Format button to set Format to Red.
    Click Ok.

    Repeat for Green format with:
    =A2>A1

    I've also attached an example file for you to look at.

    DBY
    Thanks a lot DBY. Issue is solved. Thanks for your support.

    Thanks & Regards,

    Dhwanit

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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