I want to change color of the gray line in below chart (format - red to decrease and green to increase) every month. How can I do that?
I used the following table in this workaround (starting from A1), filled B2:C10 with zeroes and created a line chart with values from cell range B2:C10:
Please note that I used the following formula for "Up" column and "Down" column, respectively:
=IF(COUNT($A1)>0, IF(OR($A2<$A3, $A2>$A1), $A2, "delete"), IF($A2<$A3, $A2, "delete"))
=IF(COUNT($A1)>0, IF(OR($A2>$A3, $A2<$A1), $A2, "delete"), IF($A2>$A3, $A2, "delete"))
What the formula does is check first if the value above the current checked cell is a number. If it is a number, for "Up" column formula, it checks the current checked cell's value if it is greater than the value above it or less than the value below and display that value if true or delete if not. For "Down" column, it's just the opposite value checking. Just tweak the formula to adapt if there's no change in the value.
Steps
Replace the values in B2 and C2 by pasting the formula above in their respective columns.
Select cells B2 and C2 and paste them to the rest of the rows (B3:C10). Select cell range B2:C10, copy and paste as value. There should be no formula left in cell range B2:10.
Using cell range B2:C10, find and replace delete with blanks.
So it becomes like this:
Replace the line colors with the ones you want to use.
Related
I have a table which has two columns with a percentage value in each:
I would like every cell in the B column to be highlighted red if it is greater than the corresponding cell in the A column.
I have used the conditional formatting formula in cell B2:
=B2>A2
When copying down this conditional formatting formula into the rest of the cells in the B column, the formula does not auto increment. The expected behavior is that it would auto increment. E.g. in cell B3 the formula would auto increment to:
=B3>A3
When adding the formatting, I highlighted the whole B column rather than just the cell B2. I have also ensured the whole range is selected in the 'manage rules' section:
I'm trying to use conditional formatting to highlight the lowest value in each row green as long as the unmerged cell above it does not read "N" (as I want that to disqualify the value in that case.) If the lowest value has the "N" (for No) above, I need to have the next lowest value highlighted green that doesn't have "N" listed. I have conditional formatting to highlight a value red if "N" is selected/entered. In my screenshot, the value in cell F11 is the lowest, but because it has an "N" above, the value in cell D11 should highlight green (with F11 staying red- If I change that N to Y, the cell turns green.)
Each item's "row" is made of two rows. On the upper row, the cells are unmerged. On the lower row, both cells are merged. The range of columns that I want to evaluate is D:CY (with CX being the last for the lower row since it has merged cells.)
Here is where I'm at with the custom formula:
=D11=IF(E10="N",SMALL($D11:$CX11,2),MIN($D11:$CX11))
I will be using this on versions as old as Excel 2013, in case that affects code support. I want to apply this to a range or rows below so I'm not sure if I've got my absolute $ addressing correct. The columns won't change except that E10 since I'd then want it to move down the row...
Perhaps a formula like this for your conditional formatting, based on COUNTIFS with staggered ranges to identify the lowest cell with a Y one row above and one column to the right:
=AND(D11<>"",E10<>"N",COUNTIFS($D11:$H11,"<"&D11,$E10:$I10,"Y")=0)
Change the H to CX and the I to CY to apply to your range.
I have a column full Dates and I am trying to highlight all of the dates if they are before 30 before todays date.
An example of why what I have that is not working is the value in the cell is 4/12/2017 and it is being highlighted when only values before 4/01/2017 should be highlighted (today is 5/01/2017).
My rule in conditional formatting is
Format only cells with:
cell value less than =Today()-30
*change background color*
but the 04/12/2017 is still being highlighted.
Select the first cell in the range you need to format, then put that cell into the formula. For example, if you select A1 change the formula to:
=A1<TODAY()-30
Then click OK and check your 'applies to' range.
You probably also want to filter out blank cells. For this you can change the formula to:
=AND(A1<TODAY()-30,A1<>"")
keep messing up formula trying to do a conditional format for cells in a column based on if the corresponding Row in another Column has a specific Value.
="IF+$A:$Arow() = D ?
Don't think I'm even close but I need the condition format For all of Column H to check the same Row in column A If its a D then format the cell.
Can anyone help?
Select all cells in column H, say H1 has a column header, so you select H2 to H100, click Conditional Formatting > New Rule > Use a formula to determine ...
Enter this formula:
=$A2="D"
Select a format and confirm all dialogs.
When you select all cells from H2 down, the cell H2 will be the active cell. The conditional formatting formula contains a cell address in column A with a relative row reference, i.e. there is no $ sign in front of the row number. The most important bit is that this row number must be the same row number as the active cell when you create the conditional format, so if your selection starts in a different row, you need to adjust the formula accordingly.
Hopefully this will stop the chain.
See the linked questions if you want more background, but I need to conditional format multiple rows (2,000+) from the FIRST (leftmost) non-blank cell + the next 11 columns after it. Not sure if it's needed for the conditional format formula, but I am able to get the start cell for each row, can kind of get the end cell (see below).
Cell address of the first populated cell in the row (*the data starts on row 2, the values begin in column C and end in column P):
{=(ADDRESS(2,COLUMN(INDEX(C2:P2,MATCH(1,IF(C2:P2<>0,IF(C2:P2<>"",1)),0)))))}
^ this gets me an absoluted text-version of the leftmost populated cell in each row. I have all these addresses in a helper column. I am then able to get the desired stopping-point for the format (12th cell to the right of the cell returned from above formula), but I have to manually enter the cell address derived from above formula:
=ADDRESS(2,COLUMN(OFFSET(N2,0,11,1,1)))
I can't nest the start cell formula inside this second formula or it breaks.
THANK YOU!
Desired result (ignore the different colors, they can be the same):
I added a helper column C that finds the first non blank in the row (my data went from column D to column AZ)
=MATCH(TRUE,INDEX((D2:AZ2<>0),0),0)
My conditional format rule applied to D2 to AZ4 was to highlight when the following was true:
==AND(COLUMN(D2)<($C2+11+COLUMN($D2)),COLUMN(D2)>=$C2+COLUMN($C2))
You can modify this to put the helper column where you wish, and to use named ranges.
(Had to add condition to not start coloring before the first instance!)