Slightly odd question, but couldn't find anything on it: I have an .xlsb file in which data is displayed by groups, which have to be selected via a drop down menu, so that only part of the entire data set is displayed at any given time.
I'd like to get the underlying data for all groups, but for some reason the sheet from which it is derived does not exist. That is, I have a Sheet1 which displays the data, and the cells that hold the data have a formula that says =Sheet2!A1, but there is no Sheet2, and no sheets are hidden.
What could be going on here? Is this a special .xlsb feature that I don't know about?
Related
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.
I'm resurrecting some old scientific data from the early 2000s.
I need to locate the custom functions that allowed the data to be shown. The spreadsheet that I have is full of #REF! cells, as they are supposed to be calculated based on a custom-defined formula (here, called 'RESECTION').
How do I find this formula? If I can see the math it was performing, I will be able to use this old data, and extend our timeseries significantly.
The spreadsheet is an ".xlsm" document. There is an associated file that is ".XLM"; it provides some GUI-like functionality that is now broken, and I do not see how to access the commands (?) or other VBA that is inside.
I have not had success with this solution.
File with the VBA can be found here; SURVEY.XLM.
Problem is seen here; calling function from SURVEY.XLM. How do I access the formula within here?
I can see that the formula is in there; how do I see the calculation it performs?
RESECTION is a named range refering to cell A4 on the hidden Survey sheet.
In the VBE immediate window type thisworkbook.Sheets(2).visible = true and then thisworkbook.Sheets(2).select.
Cell Survey!A4 contains the value =RESULT(64).
The rest of the sheet contains the macros - first time I've seen or tried to use a filled in macro sheet.
I tried Ctrl+Fto find the definition of RESULT but it comes up with Macro error at cell [SURVEY.XLM]SURVEY!A364.
I have a cell that needs to hold a user-editable percentage, but it may only contain a multiple of 10% in the range 0%-100%.
My logical solution was to just apply data validation on the cell, and specify it as "List", with the list being "0%,10%,...,100%". This way the users can both type in the number as well as select it from the in-cell drop down list.
However, when I consecutively save & close the workbook and then re-open it again, only the drop down entry works. All attempts to manually enter a percentage lead to Excel disallowing it; it just doesn't recognize the input as valid anymore. Changing the data validation definition a bit and back again makes it all work as expected, but only up to the next re-open of the workbook.
A workaround I found is to specify the valid percentages in a named cell range, and refer to that range in the validation rule; this keeps working even across re-opens of the workbook.
I wonder though if this is truly an Excel 2010 bug, or if it's something particular to my Excel installation? If anyone could test this (especially on other Excel versions), I'd be very grateful.
The steps to reproduce it:
Start a new workbook
Select cell A1 and format it as a percentage
Apply data validation, and
Set 'allow' to "List"
Set 'source' to "0%,10%,20%" (without the quotes)
Keep 'ignore blanks' and 'in-cell dropdown' checked
Verify you can both manually and via the drop-drown list enter one of these choices (you can enter it either as 10% and 0.1)
Save the workbook, close it, and re-open it
Try to enter another percentage, both via the drop-down list and manual entry
Result: manual entry triggers the data validation error prompt...
If this is a genuine bug, I'll post the above mentioned solution as a proper solution. If you have a better one, that is of course welcome as well!
Addition
The workaround I found comes down to:
In the cells C1 to C3 enter the values 0%, 10% and 20% respectively.
Select the range C1 to C3, and name it e.g. "allowedPercentages"
In the data validation for cell A1, set the 'source' to "=allowedPercentages" (without the quotes)
-- Edit: this is now part of the bigger question of how to reliably move sheets about --
I've got a workbook which has sheets containing tables and sheet-scoped named ranges. Some of these sheets' formulas link to some of the names on other sheets (i.e. =Sheet1!Sheet1LocalName somewhere on Sheet2).
The time has come for me to create VBA code that moves these sheets into another workbook. Doing so, I of want all existing functionality to remain intact.
When looping over all sheets individually and Worksheet.Move -ing them one at a time to the other workbook, the range name links between the formulas get broken. E.g. when Sheet2 uses a name on Sheet1 in one of it's formulas:
Move over Sheet2;
Sheet2 will still correctly link to Sheet1 back in the source workbook.
Move over Sheet1 itself;
Excel 'helpfully' creates a workbook-scoped name of the same name for me as the name Sheet2 linked to (even if it didn't exist before), where
this new name does point back to the already moved sheet in the destination workbook, after which
the already moved Sheet2's links get modified to point to this new workbook-scope name in the source workbook, thus
messing up the link beyond repair.
Even if I could overcome this by analyzing the formulas beforehand to scan all sheet dependencies, since sheets may have links going both ways between them, it seems I can't do it this way.
When moving all sheets in one go using ThisWorkbook.Worksheets(Array(name1, name2)).Move, I get the Excel error "You cannot copy or move a group of sheets that contain a table".
So it seems I'm sorely out of luck here... There's of course the options of:
moving the sheets individually and rebuilding all formulas afterwards, and
replacing all tables with ranges and rebuilding all tables afterwards
but I'd understandably do not want to go there, since I do not control what goes on the sheets...
Any alternatives?
-- Edit --
The true purpose of this question is that I need to move the sheets over to a temp .xlsx workbook, save/close/re-open that workbook, and then move them back again to the original .xlsm workbook, thus scrubbing them off of their VBA module. See my other SO post for the background, though when I wrote that question I envisioned only needing to scrub the 1 topmost sheet in the ranged-name linking hierarchy, but it turns out I need to do it for all sheets to be safe enough.
After a lot of trial-and-error I found out that moving or copying all sheets in one go just isn't doable because of the tables on them, and handling them one at a time really messes up formulas and named ranges linking them together (even .Copy has similar unwanted side effects to using .Move). While I could in turn write code to 'fix' these broken names or delete these 'helpfully added' rogue names, I wouldn't be surprised if other range linking mechanisms (like chart source, pivot source, data validation list source, form control linked cells, etc.) also acted up badly, making this an even bigger mess to deal with...
Alright I know this isn't 100% related to programming (the Excel book in question doesn't use VBA at all) but I'm hoping someone can help me out with this or point me in the right direction.
My boss got a spreadsheet from a vendor that has a combobox/dropdown list with various part numbers; when you select one it populates the rest of the form with a lookup containing additional items. I've been tasked with "cracking" this and finding the list that they're using to populate so we can make use of it.
The thing is... there's no VBA code, no macros, no data connections, and only one Worksheet displayed in Excel while the lookup code references a Sheet1. I've tried to display hidden worksheets and it says there are none... so where on earth could this list be kept? My boss is getting impatient and is asking me if I've broken it yet. It's not a big deal if it can't be done, I just have no clue where to continue looking for it and I don't know what to tell my boss when he asks me if I'm done.
Can anyone help?
It's possible to hide a worksheet using VBA so that it can't be unhidden from the UI.
Try the method for un-hiding all hidden workhseets outlined here:
http://www.automateexcel.com/2004/12/14/excel_vba_unhide_all_worksheets/
My guess is that it is a Data Validation list which references a constant list of values or a range on a "Very Hidden" sheet. In Excel 2007, select one of the cells with the drop-down, click on the "Data" tab in the Ribbon, click on "Data Validation" in the Ribbon and see what you have. In Excel 2003 it is the Data -> Validation... command.
Another possibility if you know the name of the worksheet is "Sheet1" is to add a new worksheet, enter "=Sheet1!A1" into cell A1 of the new worksheet, and copy this cell down and to the right for as large of an area as you need to see the data you are interested in.
If you can post a URL to download the workbook (assuming it is not a trade secret) you would be more likely to get an accurate answer.
Could it be some data stored on the same sheet.
Possibly in columns which are either hidden, or which are far off the actual page?
Isn't this just data from the worksheet only?
Column header dropdown lists acts as filters, they show distinct values of a column.
This is a feature of Excel.
The items could be cached from a currently unavailable resource. Try saving it out to xml and searching for a known string.
Click on the cell that display a drop down list when selected
From the menubar select data>validation
In the dialog box copy the content of the source text box
Now paste the content on any empty cell on your worksheet
Select a drag it down to see the values populating the list
Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com
I am assuming that you have broken this by now, but just in case you havent. This is certainly a case of data validation using a named range which is house on another sheet that was designated "very Hidden" from the vba console. You will need to open up the VBA project of this worksheet and designated the "very Hidden" sheet to just Hidden and then you will be able to unhide it, or the other setting at which point it will be viewable.