+ Reply to Thread
Results 1 to 5 of 5

Condtional Formatting Based on Another Column's Data

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Condtional Formatting Based on Another Column's Data

    I have two columns, A and B. I want there to be data bars in column B that reflect the magnitude of the difference between the two columns. If the value A-B (for a given row) is positive, I want the cell in B to turn green, with a data bar that reflected the magnitude of the difference. If the value is negaitive, I want the cell to turn red. I tried writing a formula that would do this univerally for all of the rows, but could not figure anything out. I created a third column C, which calculates the value of A-B and applies data bars to it. I essentially want the data bars that show up in column C to show up in B. Is there any way to do this?

    Thank you in advance

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Condtional Formatting Based on Another Column's Data

    quacker711, welcome to the forum.

    "data bars"?? Do you "just" want a cell in Column B to be green if the difference between A minus B is positive, and red if the difference is negative? Or is is something else you're after?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Registered User
    Join Date
    06-11-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Condtional Formatting Based on Another Column's Data

    I'll give a clearer description to try and help shed some light on the problem. Column A gives the ranking of a team in 2011, and Column B gives the ranking of that same team in 2012. If the value in B is greater than that in A, then I want two things to happen:

    1) A red data bar appear in B, as the ranking is now worse (a higher value, but a worse ranking)
    2) The size of the data bar to reflect the magnitude of the difference

    To clear up point number 2, here is some real data from my file: the value in A1 is 1 and the value in B1 is 6. Therefore, the ranking for this team decreased by 5 from 2011 to 2012, so I want there to be a red data bar in cell B1. The value in A2 is 4, and the value in B2 is 1. Therefore, the ranking for this team increased by 3, so I want there to be a green data bar in cell B2. However, the difference for the first team has a greater magnitude (5) than the second team (3), so I want the bar in B1 to be longer than the bar in B2.

    Hopefully this makes more sense. Thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Condtional Formatting Based on Another Column's Data

    Ah, right - I tried Google, which at least answered the question I asked you. The following links will hopefully point you in the right direction:

    http://www.addictivetips.com/microso...010-data-bars/
    http://blogs.office.com/b/microsoft-...xcel-2010.aspx

  5. #5
    Registered User
    Join Date
    06-11-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Condtional Formatting Based on Another Column's Data

    That seems to be headed in the right direction....

    If you scroll to the bottom of the second link, you see the side-by-side comparison of data bars for the %Profit Change in Excel 2007 and 2010. What I want is the data bars in the 2010 version. I understand how to get them to show up for a specific column, but not how to get them to show up in one column based on the data in another. In the example in the link, it would be equivalent to having the 2010 data bars for %Profit Change show up in the column Sales Amount. (i.e. ColumnSalesAmount would be formatted conditionally on Column%ProfitChange)

    I want to format Column2012Ranking conditional on Column2011Ranking. Perhaps this better illustrates what I am hoping to find.

    Thanks again

+ 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