I have a large file with a Scenario Manager, where changing a single cell on the Summary worksheet changes the visible scenario throughout the rest of the workbook. Data Tables are working a treat providing the headline values for each option.
I'd like to have a drop down on each sheet that when changed will change the same single cell on the Summary worksheet, so I don't need to go back to the Summary sheet every time I want to switch visible scenarios.
This is a simple process if I'm using macros and would be the solution I'd normally jump straight to. But this needs to be done without macros and this is where I'm now struggling.
Does anyone know if this is possible (without macros) and point me in the right direction?
Josh
You can insert combo box (Developer Tab > Insert > Form Controls > Combo Box) on each sheet. Mention linked cell as a cell of the summary sheet (Absolute reference with sheet name). That cell will give you index of the item selected in the drop down list. Then you can insert index formula in the cell you want to change every time to get value of the drop down list. Once you insert it on one sheet you can copy it to other sheets. No macros required.
Complete beginner with VBA and I think I'm doing something majorly wrong.
So context;
Creating a user friendly sheet to do checks on items etc. To keep it as simple as possible for other people I've decided to use drop down menus to input the majority of the data and tick boxes to say when the check has been done.
From here I want to add a big old button that will transfer the data from the cells, dropdown menu and tick boxes to another sheet or workbook.
I would also need the sheet or workbook to place the date the checks were done and create a new line with the information. So that I can look at a single sheet and see the wear and tear on the equipment in one form. (layout of this can be sorted out after wards just how to get it to go to a blank line etc.)
And finally to save the document.
drop down information is linked from another sheet within the workbook.
Now I've tried some code to work it out myself and it either doesn't copy the data as the cell is blank (drop down menus) or it just shoots up an error on the VBA page.
Could anyone assist in helping me work this code out? Even if its just the command syntax's that I would need to use.
Thanks in advance
Peter
As an inventory control specialist, I set up a macro and some formulas to paste and mine data copied from a IBM Power 9 inventory bin location database.
The end goal was to create a hard copy array of all bin locations with their bar codes and room for audit notes. The results worksheet is already set up with the desired formulas and formatting and divided into the desired print areas so that running the macro simply populates it with the names and barcodes of up to 2000 bin locations.
Everything works like a charm, but currently I need to use print preview and manually set the range of active sheets to print, as not all of the 48 pages spanning the active cells containing formatting and formulas are used for any given group of bins.
I have searched multiple sites for hours and have not found any code that is remotely helpful, and my self-taught VBA skill is limited to simple macros and slight modifications of other peoples' code. Is there a way to program a macro to print only pages (as defined by predetermined print areas) with values (non-""-result formulas) while ignoring pages filled only with ""-result formulas and formatting? I am running Excel for Office 365.
Thanks
My response was too long for the comment field and, more or less, answers your question so I moved it here.
The way I imagine your data, I'd loop through every page in the workbook. While on a page, I'd loop through every formula until I found a result that is not blank. On finding a non-blank result, I'd add the page to a list of pages to print and move to the next page. After checking the last page, I'd print each page on the list.
You may want to define the steps required to complete your project (similar to what I just did) because each step requires several motions and almost every one of them will be a new challenge for someone with your experience. Once defined, find the most fundamental movements that are critical to your program and start there. Keep it simple, you will not always know what the challenge will be or where it will come from. What looked like a simple step, like looping between pages, requires a basic understanding of the workbook object and that is a far more complex subject than a loop.
Keep in mind that we are here to solve problems with your current code. If you don't have a problem with existing code then there is not much that can be done beyond pointing you toward a path.
After reviewing the links provided by #ProfoundlyOblivious I quickly determined I lacked the skill to program a solution using VBA as suggested. However, trying to parse all that information got my brain on a roll and I did develop a very simple and sneaky workaround using formulas tied in with a simple one line macro.
Assuming all pages predefined by print areas are the same width, and assuming there is at least one cell that will always consistently be populated in on a used page, these instructions should work for you should you have a similar issue.
Enter the following simple binary IF formula in a blank row of the first page:
=IF(A1<>"",1,0)
where A1 is a cell in the first page containing a formula that would be guaranteed to consistently return a value if that page is being used. (in my case, the imported information is imported in columns beginning with the upper left corner of each page).
Select the row of the page (not the entire row of the worksheet, just the width of the page as defined by the print area) containing the formula, and drag fill across to all possible pages, then in the same row of the last page simply add a SUM(,,,,) formula referencing (adding) all of the binary IF(X,1,0) formulas. The resulting sum will be the number of populated pages.
Clunky, but functional.
Finally, the simple print macro:
Sub Print_Audit_Sheets()
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=Range("JW42").Value, Copies:=1, Collate:=True, IgnorePrintAreas:=False
End Sub
Where ("JW42") is the reference to the range with the SUM() of all the binary IF() formulas. It isn't fancy, but it's simple, and simple works. Be sure to change the text color on the IF() binary and Sum() cells so that you don't have random 1s and 0s obtruding in your printouts.
You will need to modify this code if your first page is not consistently populated or your value-containing pages are not contiguous.
I am working on a project which involves 14 sales consultants each with a client pipeline. These 14 sheets are in a Workbook (Workbook A) that has 1 Sheet to consolidate all the information into one pipeline.
Each consultant has an individual WorkBook that they fill in and the information is then actively transferred to Workbook A from their individual Workbook Sheets.
The problem I have is that I used a direct link (=Sheet1), because of this method I used I have to set the amount of cells to link.
All the cells I have linked with no information returns a zero in Workbook A which then causes my Consolidation page to bring in all the rows with "0" in and it does not look nice.
I would like to prevent the Consolidation sheet to import these 0 figures from the consultant sheets.
This information is constantly being refreshed so the filter also gets refreshed which means I cannot simply hide it by deselecting the value on the filter.
Maybe try using a =isblank formula to prevent the blank cells from causing you to see the 0's.
Something like this maybe =IF(ISBLANK(Sheet1!'YOURCELLSHERE),'','Sheet1!Cell')
Go to File|Options|Advanced and scroll down to "display options for this worksheet" and un-check "Show a zero in cells that have zero value". Keep in mind that this will cause cells that should display a "0" to not display that "0".
This is similar to another post I saw but different enough that I feel I needed to ask the question. I have a sheet ranges that I want to Export to a PDF. But here is where it gets difficult. One sheet that I need to print does not fit on the entire print area so what I need to do is print part of the sheet (Range) on one page and have the leftover columns print to a different page. Normally this would just need to be a separate range but I need to keep the leftmost columns for context of that second range. So the second page needs to have two print ranges on one page, is that possible? Or, can I somehow print the second page with a hidden area, i.e. removing the columns that were printed on the first page? If I went with this latter solution I would need to unhide those columns after the print job finished. I want to keep all of the printing exported to one PDF.
I did finally figure this out with what I think is the simplest solution. I copied the page twice onto separate worksheets and then simply hid the areas that did not need to be printed. I then delete the worksheets which always ask the user for permission, not the best but it works. As an enhancement I could safe to a separate workbook in the %temp% directory. That way it would not ask permission to delete as no deletion would be necessary.
ADD. I did not realize this but I can easily turn off the alerts in VBA and solve that display pop up problem.