Printing excel workbook without white space between sheets - excel

I am currently working to provide an extensive xls-based form, which is then to be filled by various users and submitted to a committee deciding about the files.
The form will need to be printed for this last step, and as some sheets are limited to a couple lines only and others could flow over to a 2nd or 3rd page depending on free text user input, I see the risk of having a lot of white space in the printouts (e.g. three quarters empty pages).
I have considered/am considering some ideas to get this done:
Moving all individual sheets to one sheet, which is then printed more conveniently - probably not a good idea because of the variety of needed column widths making it impossible to properly format anything
Possibly coding in VBA to copy the individual sheets (by print areas) to a word doc, which is then printed easily - I know basic VBA, but would definitely need guidance as to how this could be achieved
Does anyone on here have other ideas or guidance on the ones posed above?
Many thanks in advance

Related

Excel Data Forms

I'm trying to create a skills matrix for work, but im not sure how to go about it, considering that Excel only allows you 32 columns in a data form.
My problem is that I need 57 columns, 1 Staff Name column and 56 jobs columns.
I was hoping to possibly have 1 normal text cell for the names, and check boxes for the other 56.
Any ideas on how to do this would be greatly appreciated.
Brian, you did throw Mac and I for a loop with your 'Data Form!' For your project - an easy way to several people to insert data into a spreadsheet - there's a million ways to do it. However, there are a few common guidelines:
No matter what holds the data, the user experience it what matters
Second, making dynamic code (especially with ranges), will do best
Using proper error handling will help keep you, the developer, in the know
You can use a simple UserForm, or an ActiveX sheet object to input data
Use smaller DataTypes & WorkSheet functions wherever possible; this will reduce system resources, and run faster
When you decide on a path, and want to learn specifics, please come back and post more at that time.
Danny,
ExcelVBADude

Finding the cause of Excel file corruption

I have a feature that downloads things to an xls file using Apache POI. Mostly it works. But on one particular database, the resulting files are corrupted and won't open in Excel. I get the message "We found a problem with some content in 'DownloadFoo.xls'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes." . Clicking yes results in all the formatting, data validation, etc being stripped out. On the other hand, if I open the file in Open Office Calc and save it, it's fine and can be opened in Excel from then on. (The people who want to use these files aren't allowed to download Open Office Calc, so this is not considered an acceptable workaround.)
I have tried narrowing it down to see which data is causing the problem, but it seems to occur whenever 10 or more items are downloaded, regardless of which items they are. (On other databases, it's fine to download 100+). Excluding some of the columns helps, but they are perfectly innocuous looking columns (and virtually identical to other columns which are fine) so this still hasn't got me to the bottom of it.
Are there any techniques I could use to find out what Excel has a problem with in the corrupted spreadsheets?
I can't make major changes like getting it to download to xlsx instead as this feature is going to be scrapped and replaced with something completely different in the near future, so I'd like to just focus on the problem at hand.
It turns out that the solution to the problem was to reset the data validation lists more often. Quite a lot of the cells in my spreadsheet have data validation. When the data validation lists are longer, they are stored on a hidden sheet. If several cells need the same validation, I try to get them referencing the same list in order to not write out too much stuff on the hidden sheet. However Excel apparently dislikes it when too many cells reference the same list- it's not against the rules as far as I can tell, but it doesn't like it anyway. When I changed it to rewrite the validation lists for every 5 items, it started working.
The reason this database was different was that the items had an unusually high number of subitems, so they occupied a lot of rows even though it didn't seem like many things were being downloaded. Some of the problem columns just had true or false validation rather than using the lists on the hidden sheet, so I don't know what that was about, but resetting the validation lists helped anyway.
This doesn't really answer my question as I never managed to get any information from Excel about what the problem was, or use a particular technique, it was just a series of coincidental findings. I'm putting it here anyway in case anyone else has a similar problem. Also the thing that started me on the right track was finding an old comment when double checking that it doesn't do anything different for over 10 items (it doesn't) in response to Andrew Morton's comment, so thanks Andrew!

PowerPoint live fields, linked to Excel data

I would have thought this one would be asked to death so cannot see a solution - looking for a way to live link PowerPoint to Excel data, only for a word within an otherwise manually typed sentence.
I am not asking how to live link a chart or a table, I am asking how to have a live field within otherwise static text.
E.g. In a text box, there's the sentence "Revenue increased by 10% over the period, an improvement from the 7% increase over the prior period" and have only the '10%' and the '7%' be linked to two Excel cells.
I have seen that this is possible in the following pieces of software:
https://www.youtube.com/watch?v=mUGqgsT4gHU (skip to 20sec)
https://www.presentationpoint.com/blog/dynamic-text-boxes-powerpoint/
Doesn't seem like it's do-able in VBA though I'm comfortable in .NET too and have not been able to work out how this works, so any suggestion in either most welcome.
There are multiple suggestions to the effect of copy a cell and then paste-special - this does not allow you to embed the number in the sentence, it only allows you to past the cell in, which you would then have to type around. In the two links above, it is properly embedded and this is the type of solution I am after.
I think this is very do-able in VBA. The program on the website is of course very sophisticated, but you could very easily replicate some of the functionality.
For example by using tokens. You could enter something like "Best beer in city: #beerBrand#". Then you would iterate through your columngs and just search and replace the tokens.
If I get the program functionality right, what they do is ask the user to enter a prefix and sufix for each variable. That makes it even easier because you have the three parts of the sentence separate and you can just alsways replace the variable in the middle.
Would one of the approaches work in your case?

Excel Timesheet Matrix to Listed entries

I'm tying to convert a matrix of data into a list of entries. I have found a few solutions that are close but nothing that I can get working completely. My challenges are I need 4 pieces of information from each row and I want it to be automatic. This Solution was close, but I need something That brings an extra two columns with it.I don't want to have to process the data once it's entered into the Grid.
I created something that works but I feel it's clumsy and there has to be a better way to do it. I have added a Sample Time sheet to my Google drive of what I have created. Essentially I enter the work order, description and pay code on the left. The dates are up top and hours hours worked are entered into the grid. I use a few simple formulas to make a list of every grid cell in the format my finance department needs and then bring it back into the main sheet to sort it. I feel this setup is fragile and it requires manual sort every time info is updated.
Can you help me get from the format on the left to the format on the right with 0 steps. The data arrangement on the left can be modified but the data on the right has to be exactly as show. Mostly I don't know what I'm trying to do is called. It took me longer than I care to admit to find the term "matrix to list." All suggestions are welcome.
Thanks
A Screenshot of the excel sheet for when the google drive link stops working.

Excel Formatting Report Using Macros

I am looking at formatting a report which has been automatically generated by a 3rd party system. As we have no access to the Database directly i would like to build a Macro which would format the report into a more readable format.
I had initially thought about ingesting this raw data into a database as i am pretty competent a writing the SQL queries, however i think it would be easier if someone could run this through a macro.
The initial report shows which users have attempted which training modules and their completion status.
N.b. A user may have completed a module several times, therefore will appear multiple times.
The link below is the spreadsheet with two sheets, sheet 1 is the raw data and sheet 2 is how i would like things to appear.
https://www.dropbox.com/s/p1hipx17q3mf3dm/Learning-Report.xlsx
Any help / ideas would be much appreciated as i am pretty new to the whole macro's in excel thing.
Many thanks
Ian
I am answering in the same manner the question is phrased so please bear with me...
Identify all unique employees (for rows)
Identify all unique courses (for columns)
Find all the attempts and compute
a. Highest Score
b. Status
Put the data in the second sheet.
See if the question has been precise... the answer would also be to the point.

Resources