1
votes

I have a pivot table where the rows are ID numbers and the columns are years and between the two is a numbered value.

I want to use conditional formatting so that if the value in the column before another is greater (ie, I6>H6), then that column will turn green (ie, I6 is green). If there is no value before it leave it blank (ie its the first value in the row, or the only value in the row.

Below is the current conditional formatting I have on the sheet(and yes, the first cell of data is in cell c6, the last is in L1072, the ID number is in column B) enter image description here

here is the outcome: enter image description here

Here is desired outcome: enter image description here

1
Some sample data and the expected result, or maybe a screenshot, would be helpful to understand and answer your question, thanks!BigBen
Hello, I reworded/fixed my question! Thanks!vba_user111
Can you also add a screenshot of your pivot table? Or perhaps two, one with the results of the current conditional formatting, and one with the desired results (just colored in manually)?BigBen
Yes! I edited the question and included the images and clarified the question a bit. Thanks!vba_user111
Perhaps something like =AND(B6<>"",B6<C6).BigBen

1 Answers

0
votes

Here is what I got to work.

1) The first formula is there because there is a number in the C column that was turning green, so the first formula made it so that if the number in the cell isnt 0, then for there to be no background color

2)The second formula made it so that if the cells are equal, then they color of the following cell in that row is blank.

3)The 3rd formula as stated above by @BigBen states: AND(B6<>"",B6

4)This formula does the same as above, but opposite (less than so it turns green)

enter image description here