Is there a way to remove the aggregate values that appear in the collapsed form in Pivot rows?
Please see the attached screenshot.
I dont want the Sum of the values that appear against a Name if the Row is in collapsed form. I have already selected "Do not show subtotals" but that doesnt remove this. Only when we expand the field, then the values on the header row disappear.
While this doesn't address the specific question, you could change the report layout to Tabular form. Your PT will look like this, where the 2nd named field is empty when collapsed. That may help someone identify when to ignore the numeric columns.
To better identify when to ignore those numeric values, you could also add conditional formatting to the numeric columns (C and D in this case).
Highlight the entire pivot column C and then go to Conditional Formatting... New Rule... Rule Type "Use a formula to determine which cells to format".
In the formula bar within the conditional formatting popup, type: =isblank(b4)
Click on the Format button.
Here you can decide to format the font or cell. Pick a format you want, such as a Gray cell.
Repeat steps above for column D.
Here, I choose a gray cell for Column C, and white text for Column D. Column D looks blank when collapsed, but it's really not.
Here's how the PT will look:
Related
I'm sure this is very easy, but I can't make conditional formatting work for me. What I am trying to do (example attached), is have one column for date, one column for an action to be taken and one column to assert whether the action is done or not (y /N). This worksheet will be expanding every day so needs to be future-proofed.
I am trying to get the cells in column b to either display Red when an 'n' is displayed in the adjacent cell in Column C, or change to Green when a 'y' is entered in column c.
I can get one cell to do it, but when I apply the formatting to the whole column, it changes ALL the cells in column 'B' to green when I type a 'Y' see example
. I suppose what I need is an 'if' statement, or a way of dragging a formula down the column B - but I can't work it out.
Any help gratefully appreciated!
Try this, select the cell where you want the background color and click "Conditional formatting" then add a "New rule" and select "Use a formula to determine which cells to format" option.
In the formula field write =EXACT(CELL;"y"), where CELL is the cell you have your y/n value. In the format, set the background green or the color you want.
This way you can add another rule to check if content is n an set bg red.
With autocomplete of excel just drag down and every cell should updates their conditions to check their adjacent cells.
It should look like:
I need your assistance with Excel. I have the following columns on my worksheet
EmployeeNumber, EmployeeName, SalesID,Email, EmployeeNumberID.
The EmployeeNumber and EmployeeNumberID columns are the key columns as these contain the employee number. The problem is that EmployeeNumber contains all employees from different departments and EmployeeNumberID contains employee from the Sales department.
Could you please assist with highlighting the EmployeeNumber that are not in the EmployeeNumberID column, if we could highlight the entire row that would be great.
Mnay Thanks
Assuming your data is layed out as per the image below, select the range from A2 to E9 and ensure that the upper left cell A2 is your active cell. Notice in the image the active cell has a light background compared to the grey background of the rest of the selected range.
Then go to your HOME ribbon and select conditional formatting.
From the drop down menu that appears select New Rule.
In the New Formatting Rule window that appears select "Use a formula to determine which cells to format" at the bottom of the list. Then click to format button and chose whatever formatting you want to have applied. I would recommend the Fill tab and then select a colour.
Enter the following logical check in the "Format values where this formula is true:" box:
=COUNTIF($E$2:$E$9,$A2)=0
It will count the number of times Employee number in column A occurs in Column E. It will then check to see if that count is zero meaning its not in column or not part of the sales team, and apply the formatting you selected early to all cells in the row from A to E. If you only want to colour cells in column A then select A2:A9 as your initial selection area for applying conditional formatting to. The equation should not need to change.
Proof of Concept
You just need some conditional formatting. Select the area you want to apply the highlighting to, lets say A:E, then use conditional formatting with the following formula:
=ISNA(MATCH($A1,$E:$E,0))
assuming EmployeeNumber is in column A and EmployeeNumberID is in column E.
What this does is tries to match the EmployeeNumber to a value in column E. If it fails, then it will return #N/A and ISNA will return TRUE and the row will be highlighted.
Note that $A1 should be the top left cell in the range you are formatting. If you start lower, adjust the cell accordingly.
I have two Excel columns of numerical natural values and of the same length.
For each row I would like to fill the cells with red if the values are different, with green if they are equal.
I thought I could do this using Conditional Formatting but it seems it is not fit to compare two columns.
Am I wrong? How can I do that? How to use an IF statement for this?
Assuming the values are in column A and B
To create the first rule:
Select columns A an B. Do this by dragging from column header A to
B.
Then, click Home > Conditional Formatting > New Rule.
In the New Formatting Rule dialog box, click Use a formula to
determine which cells to format.
Under Format values where this formula is true, type the formula:
=$A1=$B1
Click Format.
Select a green fill color.
Click OK until the dialog boxes are closed.
The formatting is applied to column A and B.
Now you can create a second rule for =$A1<>$B1 with red fill color.
A "cheat" (if your columns are not too long) is to transpose your two columns, then use CF's Highlight Cells Duplicate Values rule (but change the default colours to suit) and transpose back again. It may be a slight advantage of this transposition that formatting will not be applied to cells in the same row that are both blank (though easy enough to arrange for this with a formula rule).
The point of my answering however is really to say that you only need one rule. Since every cell is going to be either red or green using standard formatting for one format is sufficient. For example, fill your entire data set with 'standard' green fill and then apply a formula rule for red. This will happily override the 'standard' green fill where appropriate.
If applied to Range $A:$B (such as by first selecting ColumnsA:B) I suggest a formula rule of:
=AND(A1<>"",$A1=$B1)
You do not need an IF statement because the formatting is conditional (the IF is implicit).
Assuming your data is in columns A and B, first select the column you want to colorize.
Then for the green :
Conditionnal Formatting > New Rule > Use Formula to determine... > type formula : =(A1=B2)
Then Click the Format... button and choose Green color
And for the red :
Conditionnal Formatting > New Rule > Use Formula to determine... > type formula : =(A1<>B2)
Then Click the Format... button and choose Red color
I have a 1600-2000 rows of data in a spreadsheet that changes daily. I would like to highlight any row that contains such as 000000000000053851 in the R column. I had tried conditional formatting using this formula:
=OR($R1="000000000000549543",$R1="000000000000267294,$R1="000000000000053851")
but it seems to highlight a few rows that are blank in column R also.
Using the same numbers highlighted in column R, I would like to have an alternate number and possibly other data pasted into the corresponding row in column S. Each number has a unique alternate number and data to go along with it. This is how I picture a line may look with the highlighting and alternate data next to it:
I intend to record a macro using a few of the different steps that are likely required to do this. Any way, whether conditional formatting or an array formula, would be great to help with this.
For the sample provided, a CF rule of:
=LEFT(R1,12)="000000000000"
applied to ColumnR will format the sample and if you wish the cell immediately to the right. It will not highlight blank cells.
HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true:, enter formula from above and Format... with Fill red, OK, OK.
If you want the cell to the right to be formatted also, select ColumnsR:S instead of just ColumnR and change R1 in the formula to $R1.
For the cell to the right you provide few details but VLOOKUP in conjunction with a two-column table should suit. Column on the left being the ColumnR value, with the right-hand column for the same row the ColumnS value required. This table could be placed almost anywhere.
This could all be done with Record Macro.
I have a range of dates in the following format
Hire TERM ReHire1 TERM2 ReHire2 TERM3 ReHire3 TERM4
The problem is that some rows might be missing a date, say a row will have dates in all but 'term' (B2). I can go in and use the filters to show blanks, but this becomes a nuisance when there are 15-20 date columns. Is there a formula that will look at the whole range and return an error of sort where there are empty cells?
Below is a comma delimited sample data that you can import into excel to help illustrate.
Hire,TERM,ReHire,TERM,ReHire,TERM,ReHire,TERM
05/06/2002,12/09/2002,,05/12/2003,02/10/2004,03/29/2005,,
05/30/2000,05/24/2004,09/27/2004,11/27/2004,,08/31/2006,05/24/2007,
03/15/2004,02/01/2005,02/16/2005,06/13/2005,02/06/2006,03/13/2006,10/14/2007,01/06/2008
03/13/1998,08/28/1998,,11/20/2000,11/03/2002,07/23/2009,09/08/2009,11/21/2009
07/12/2007,05/01/2009,07/12/2007,05/01/2009,07/28/2011,,07/28/2011,
12/20/2004,11/11/2005,02/23/2009,11/25/2009,08/10/2010,08/24/2010,,
08/23/2001,08/11/2002,,11/22/2006,01/15/2007,,,
Additional details per feedback:
A missing value -or "gap" as I call it- would be if a row has dates under hire and rehire but no date on Term.
You can either:
Split your data with Excel builtin solution and choose to split on commas ,
Select your data on Excel
Then click on "Data", "Text To Columns..."
Click on the "Delimited" radio button
Then click on the "Next" button, in "Delimeters" put a checkmark in "Comma"
Then click on the "Finish" button.
and then find the empty cells with a conditional formula
Use this kind of formula
=IF(ISERR(FIND(",,",A1)),"Missing value","")
to check if there is any missing value
One option would be to use conditional formatting on the cells. In Excel 2010, highlight the data range, pick "home->conditional formatting->highlight cell rules->more rules".
Then pick "format only cells that contain" and change the drop down with "Cell Value" to "Blanks" and click the "Format..." button and set how you want it highlighted (Fill color to yellow for example).
Alternativley, you could add a formulae "countblank" either over the the entire range or a subrange (row for example) and it will specify the number of blank cells. For example, you could in the final column add "=countblank(a2:h2)" and then filter the results for anything greater than 0. This would show you all the rows with missing data and you could correct them as needed.
I have imported your data into Excel 2011 on a mac.
If I understand your question, all you want to do is to find the empty cells. Then you just press CMD-F or CTRL-F on windows to start a search. You just leave the search field empty. Excel will then show you the empty fields one by one.