How to hide a specific row of Excel chart data table? - excel

So right now I have a chart with 3 series, which will have 3 rows of data in the chart's data table. If I want to hide the last row in the data table, but keep the series in the chart, how can it be done? The only way I can think of is to create a block to cover that part, but is there a better way of doing it?
Edit: I'm looking for a way to show the series in chart, but not in chart data table.

Select the last row of chart data and format the cell's displayed text/number as ;;;. If the chart data is dynamic, then the last row can be identified with something like,
=row()=match(1e99, A:A)
This would enable you to create a conditional formatting rule that applies the ;;; cell number format to the last row.

Expanding on my comment to your question.
You could:
Make a new table on the worksheet that points, via formulas, to the range that the chart is made from.
In those formulas, use if() statements to toggle the values on/off based on whatever logic you are using to hide/show. Below I use a checkbox.
Remove the data table from your chart
Make the background of your chart area "No Fill" so it's transparent.
Line your chart x-series up with the formula based table so it looks like the data table for your chart

You can just make changes in the graphs.
Select the line graph series that you do not want to display in the chart.
Right click and click on "Format Data Series"
Click on "Fill & Line" (an icon of a paint)
Select "No Line"

Related

Color excel pivot columns based by column header

I would like to change background colors on the columns in my pivot table based on the header (dimension on the X-axis).
When i click "Banded colums" it just colors every secon column, but i want the behavior from the last table in my example below. It should change every time the year is changing.
In the example the columns are always grouped in pairs two and two, but a solution that can handle variable column-sets would be perfect.
Any suggestions?
Example
Now I understand, I totally misread your question.
Right-click one of the pivottable styles you like and select "Duplicate".
Give the style a meaningful name
Click the First Column stripe item
Set Stripe size to 2
Click the Second Column stripe item
Set Stripe size to 2
OK
Click the PivotTable Styles dropdown and select your newly added style.
Check "Banded columns"
I'd suggest to use a conditional format. Home, Conditional formatting.
Suppose you want to highlight all columns which have "#Rolls":
Select all data columns in the PT, for example cells B4:I20
Click Home, Conditional formatting, New Rule
Select "Use a formula to determine which cells to format"
Enter this formula: =B$4="#Rolls"
Choose the appropriate format by clicking the format button and setting things up.
OK your way back to Excel

Slicer is changing row heights of my pivot table?

I want to apply a slicer to my pivot table so users can filter easily, but whenever I select something, the row heights change. I have 'Autofit column widths on update' unchecked and 'Preserve cell formatting on update' is checked'.
Any ideas would be greatly appreciated!
I was able to figure this out by changing the font size of an empty column outside of my PivotTable to fit the row height I wanted. For example, I want my row height to be 30, so I changed an empty column's font size to 24. When I applied my slicer, row heights looked fine!
Is the Wrap option perhaps set for cells in the pivottable?
The answer marked as correct didn't work for me, but got me on the right track.
Check to see if there are cells anywhere on the same row as the cells that are automatically changing height which are of a larger font size. In my case, I had hidden cells (columns) to the right of my pivot table which were 8 pts larger than the cells in my pivot. The pivot table was adjusting the height to accommodate the other cells outside of the pivot table which happened to be hidden from my view so I couldn't see them.
Just had and resolved the same problem on my workbook. For me, it's related to the formatting in a table header NEXT to the the pivot table being set to Wrap Text. Unwrapping the header in the adjacent table fixed the problem.
Basically every time I updated the slicer, Excel tried to resize the header in the adjacent table to what it thinks is the proper fit.

How do I update the data label of a chart?

For example, I have a pie chart, 95% of it is blue.
Now I update some excel fields that have to do with the blue area of the piechart, 95% then goes down to 90%.
Now I want to also update the Data label of the blue area because it is still 95% and not 90%, instead of changing it manually, how can I make excel update the labels for me?
First, you have to build the labels via formula somewhere on a worksheet. Once you've done that, you can link the chart's labels to the cell containing the "data labels"
To build your data labels, somewhere else on your worksheet (conveniently, in the adjacent column would be ideal), use Excel formula to build the desired label string, for example: ="Blue occupies "&TEXT(B3,"0%")
Repeat for the other points in the chart.
Once you've done that, here's how you link Data Labels to a cell reference (normally, Data Labels are linked to the underlying data value).
Select the data label
Then, place your cursor in Excel's Formula Bar, and enter the formula like ='Sheet2'!$C$3.
Now, that data label is associated by the formula, to the cell C3, which contains the desired data label that we built above. Repeat as needed.
Note: The sheet name is required in this formula. Use single-quotes around the sheet name if it contains spaces.

Add data points to Excel stacked bar chart

I have a table with salary ranges for various titles and individual salaries (see below).
Data:
What I'd like to do, is to create a stacked bar (or column) chart in MS Excel (Office 365 ProPlus) which shows the ranges, as well as the individual salaries with employee names as data markers. Please note that the number of employees is not the same for each title, e.g. there are 2 clowns, but 3 jugglers and so on.
Here is what I'd like to achieve. I have manually added a couple of data markers for illustration by editing the image:
Desired chart:
With your horizontal bar chart already in place make sure it is a stacked horizontal chart, then create the data for the blue dots like in the table of my screenshot. Select B12 to C19 and copy. Then select the chart and use Paste Special. Paste with these options selected and all others unticked
new series
values in columns
Categories (X Labels) in First column
That will stack bars onto the existing chart. Select the stacked series and change the series chart type to Scatter chart.
The row position and the salary column are in the wrong order for our purpose. Using copy and paste, paste the row position into column D, then copy C11 to D19 and paste to B11.
Then add data labels with the option "Values from cells" and select A12 to A19.
Adjust the salary values and the formatting of the dots.

How to move cell colour when sorting data

In my spreadsheet I have coloured rows but when I sort the data the colours stay in the same place and don't follow the sorted data.
So if row B is red and the data moves to row A after sorting, row B remains red but I want row A to be red because that's where the corresponding data has moved to.
How can I do this?
It sounds like you're using a table and have applied a table style. You need to convert the table to a range, then convert it back. Do the following:
Select a cell in the the table, then under the 'Table Tools' > 'Design' tab, select Convert to Range. Select yes at the pop-up asking whether you'd like to convert it to a normal range.
Highlight the whole table again, the under the 'Insert' tab, select table. Click on ok in the pop-up window.
The formatting should remain consistent now when you're sort the data.

Resources