How do you set the row heading width back to default setting?
I have trawled all around the internet for an answer to this question, so would really appreciate if someone can help me out.
I have a workbook with 10 worksheets, and all of the row headings are normal and fine, except for on one tab, where the width of the headings has increased to approximately the size it would be at the bottom of the page (on row 1048576).
When all of the rows are displayed, the row heading width is fine, however I only want to display the top 5 rows (the rest are currently meaningless to the tab), but when I hide the rows below row 5, the row heading width increases.
Image: Row Headings at increased width
It appears like it is a setting which is automatically adjusting the width, but I cannot find the option in the ribbon or in the VBA object browser.
Any help would be greatly appreciated.
Many thanks.
Related
I have a Cognos report with a few calculation columns that are necessary not to be hidden otherwise there are alignment problems. The grouping is quite intricate and requires these columns to be there.
In order to hide the calculation columns I set their width to zero pixels. In the HTML version of the report the column does not appear, however in other versions like in Excel there is an empty column appearing. Any ideas how to solve this?
I'm developing raport generator with fixed data range.
My row and column number vary from 'A34' to 'V64'. Each active column have same amount of rows. Active columns are placed next to each other, from left hand side to the right.
Things I've tried:
Chart from table but it does not look good as chart is full-sized no matter of data amount.
Macro record
VBA but I'm stuck after dynamic range on X-axis
Unfortunatelly I cannot post images yet but below is example data, blue represents possible data range
http://oi63.tinypic.com/21zp5d [dot] jpg
Thanks and have good day
Solution is finding data range and exporting that into chart, using VBA.
Start at C34
-Go to the right till you find first empty cell
-Go to the bottom till you find first empty cell
Now you can work on x,y coordinates and create your data range.
But I'm still open to new ideas
Every row in the Q column computes the quantity of prime numbers(up to 9) in the 15 numbers in the same row. These 15 ones come from an external txt file.
Then, when I update the txt and refresh it in Excel, the formula on the last row changes so that it does not work the expected way.
It's hard to explain so here`s a picture:
Can anyone help me with this one?
Click on Properties under Data tab
Click on "Overwrite existing cells with new data, clear unused cells"
I'm tired of merged cells. They just don't work.
So I found a way to avoid merging cells horizontally, when I just need my text to be centered across multiple columns. That's: Range("A1:C1").HorizontalAlignment = xlCenterAcrossSelection.
It works like a charm. It's perfect. It's just what I needed.
I oh-so-naively thought you could do the same vertically, for centering text over multiple rows. Something like: Range("A1:A3").VerticalAlignment = xlCenterAcrossSelection.
But alas, that doesn't work.
Am I missing something here, or did Excel developers really think that, while centering across columns is a common deal, centering over rows is so much of a silly idea nobody would ever do that so why even bother?
You can try this:
Sub VerticalAlign()
ThisWorkbook.Sheets(1).Cells(Round((WorksheetFunction.CountA(Range("A1:A6")) + WorksheetFunction.CountBlank(Range("A1:A6"))) / 2, 0), "A") = "Your Value Here"
End Sub
You'll need to change the ranges being counted, and the column it's referring to, but that should just about do it. A little warning, though: VBA does NOT round the same way that Excel does. It should always be within one digit, though. You can read more about that here: http://support.microsoft.com/kb/194983
We use textbox shapes over cells to do this. If you hold Alt while drawing out the shape, the corners will snap to the Excel grid and move and size with the cells, so it doesn't take much more time than typing into the cells.
I found a happy accident that works around my issue on this if anyone cares to know.
For my situation I needed to track employee vacation time on a linear calendar that was sort-able by name and responsible area. The title section covered three rows that i wanted visible when the data below was filtered. Row 1 = years (merged across months), Row 2 = months (merged across days), Row 3 = days.
Cells A1:A3 was merged and labeled Names (employees), B1:B3 merged and labeled AREA (responsibilities) so we could track vacation time on a calendar spreadsheet to make sure each area had coverage (at least one employee responsible for it was available). The downside of this method caused the filter blocks to be associated with row 1, so row 2 and 3 were hidden when names were filtered on.
Then I tried the VBA code from previous post and it worked, but maxed out at font size that would fit, if too big it would be cut off. So Aesthetically, it looked bad.
Then I put the Names/Area titles in cells A3 and B3 without merge and set filters on row three. This filtered everything starting at row 4 effectively without hiding anything above it, but still looked bad.
Now I found the work around. If you have your titles in the top cell of where you want to merge, and some value in the bottom section. Set filters on the bottom section (need a value to set filters). Then merge the three cells, it works.
So now my A1:A3 Name, and B1:B3 Area is merged, but the filter boxes are on the bottom of the sections (aligned with row 3).
Hopefully that works for some people. I then locked those cells from edit (except auto filter settings) and now it cant be changed accidentally. only filtered.
I have an Excel sheet whose size is 100 rows and 10 columns.
How can I save this excel sheet to MS Word doc such that:
Each page in the word doc must contain a table of consecutive 25 rows from the excel sheet.
(First page contains first 25 rows, second page contains next 25 rows etc).
Can I specify the row height, column width, Font type and Font size while exporting to Word?
I guess a 'neat' answer is not available, or you would have heard by now! But there are several workarounds:
Most obvious: Select and paste 25 rows at a time (only involves repeating 4 times!) If you want a title row/rows on each Word page then hide appropriate rows before copying.
Copy and paste entire table and insert 3 Page Breaks where required, or enough blank rows to force next 'block' onto the subsequent page. If that leaves borders around empty cells, reformat those rows without borders.
Both 1. and 2. allow changes to column/row spacing, font size/type etc.
Insert as images, 25 rows at a time (with or without headers, to suit) and either Page Break or use extra lines to get the spacing suitable.
3.will not give the flexibility of 1. and 2. (so you might want to ensure font type etc is suitable before copying) but the size of images can be increased or reduced to suit. Images also have the disadvantage that not all formatting is copied faithfully.