Prevent re-sizing of charts when column and row dimensions are changed - excel

I have plotted many charts on a sheet. The chart dimensions are fixed mentioning the chart should be how many rows and columns wide.
The charts are plotted with these dimensions; but if the column width or row width is changed, then the chart dimensions increase accordingly. I want a code which will not resize the chart on further changes with the column and row dimension changes once the charts have been plotted according to original row and column dimensions.

You need to set the charts to Free Floating, so they do not resize in response to row and column changes.
ActiveSheet.Shapes("YourChartName").Placement = xlFreeFloating
Do this for each of the charts.
You can also do the same, manually, without VBA. Right-click a chart and select Format Chart Options. Then, under Properties, select "Don't move or size with cells."

Related

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 to hide a specific row of Excel chart data table?

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"

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.

My Excel row is locked at height of 409.5 and I want to increase the size

The height for one of my rows in excel maxes out at 409.5 and I need to increase the height. Where/how can I fix this.
Create a row below the row you want taller than 409.5
Select cell of top row, and cell of bottom row
Click arrow next to the Merge & Center button in the Alignment section of the Home tab on the ribbon
Click Merge Cells
You can repeat this process multiple times if two cells worth of height isn't enough.
Note that Merge & Centre isn't available for a table, only a standard worksheet.
You can merge two rows so that you get more space to work.

change the height of a rows in excel when hundreds have been set to 0

I have an excel spreadsheet with a list of hundreds of users. A lot of the rows have been set to height 0. I want to set all of them to the same value so I can see all of them. I'd rather not have to go through every row and drag the ones with height 0 down so I can see them.
What do I do?
Mark all cells and double click when the resize icon is visible over the columns.
Assuming you are using 2003 or 2007:
Highlight all of the rows.
Right-click over top of one of the row numbers.
Click the Row Height menu item and set it to your desired height.
Select any cell in the data range, then Ctrl+Shift+L(apply data filter).
All rows with zero row height will appear.
Can use Ctrl+Shift+L to trigger data filter off.

Resources