Multi-variable data table in Excel causing it to hang up - excel

I have 13 long sets of data of different variations of an instrument. For a particular set of parameters (2 parameters - say X collectively), I have a series of formulas that calculate certain outputs (26 outputs - 2 for each data set, say Y collectively) in a table.
Now, I build a new table populated with about 20 sets of all different Xs and all the resultant Ys using a method suggested here, wherein the INDEX function and the data table feature of Excel are used along with 2 selectors (1 for the parameter set and 1 for the output set) to create desired multi-variable table for a table full of different parameters.
I have used this method a few times before as well without any problems. This time, however, the data tables are too long and each output calculation needs going through all of them using multiple INDEX functions. This is causing Excel to hang up a lot. For a single set of parameters it works just fine. As soon as I try to populate my multi-parameter table, it starts acting up. So bad that my PC almost freezes.
Any suggestion on how can this process be made faster? I had seen some options for multi-variable tables and found this a convenient one. In terms of computational complexity is this not an efficient method and is there another more efficient one?
I tried using Excel Online hoping for Microsoft to use it's own computing power there, but it acts weirdly online - random deletion of cells and stuff. Has anyone had success with Excel Online in such computation issues? (I have Office 365 subscription)
My PC specs:
Intel Core i7 5500U
16GB DDR3 RAM
Windows 10 x64
Let me know if any other information is required. Thank you in advance.
Edit 1: A minimal example is best represented on this page - https://www.mathscinotes.com/2016/10/excel-data-table-with-more-than-two-input-variables/
My own sheet uses exactly the same method except with higher number of parameter sets and output sets and larger amount of data to create output from.
Edit 2: I am attaching a screenshot of my Excel sheet as an attempt to explain my own formulas, as suggested by BigBen. My Excel sheet's formulas' screenshot
In the event that the link I posted dies, I am also attaching the image of the example that I had previously mentioned. Mark Biegert of Math Encounters' example

Related

Scenario manager: can you create scenarios in a table, and get the Scenario Manager to read from there?

Microsoft's official site has an explanation on how to use scenarios in Excel.
If you name the input cells, the scenario manager will show the name, so it's easier to remember that $C$5 is, say, the price.
My question is: is it possible to set up the scenarios in a table somewhere in Excel, and get the scenario manager to read from there? Setting multiple scenarios in the scenario manager is very fiddly, time-consuming and error-prone, especially when the inputs are linked - e.g. setting 10 scenarios where each scenario is an x% change from the previous.
Any suggestions?
PS I know all these things can be done very easily in a scripting language like Python or R, but in this very specific case the calculations are not too complex and the file needs to be shared with other people, so I must use Excel.
VBA would be a last resort because some of these people have VBA disabled by default.
Edit
To clarify, what I'd need is a way to create a table like this below, where those in blue are the inputs, and those in grey are the outputs. I have put together a banal example below, along the lines of the example in the VBA macro answer given below, but the general idea is:
define a number of scenario as the combination of multiple inputs (more than 2) ;
create a table showing, for each scenario, the inputs and some key outputs;
note the table doesn't have all the possible combinations of all the inputs, like the macro given in one of the examples - that would be too much and wouldn't be very readable.
I could put together a quick VBA script that changes the inputs in the model, reads the result and creates the table, but I was wondering if there is a better way - VBA is typically not very robust, in the sense that just changing the location of one cell can often mess things up. I usually avoid Excel for the more complex models (this would be banal in any scripting language), but this I have to do in Excel.
EDIT #2:
Trying to further clarify what I have in mind, I have put together the screenshot below. Each output is the result of many different calculations, and CANNOT be calculated as a small, simple formula - if it could, I would not have any issue, of course!
My issue is that:
- if I change an input, then all the many many calculations occurring behind the scenes change
- the outputs are read from all those calculations
- I cannot use two-way what-if tables
If even this is not clear, the only other thing I can try is to upload an Excel file, which is generally discouraged on SO.
Scenario Manager is a built in function with it's own GUI.
For this reason, the function will be limited in what it can call (only data entered in the GUI)
VBA will allow you to manipulate this data, telling it where to pull the changing values and what data to change it by
So the answer for your specific query:
Can I use Excel without VBA to perform Scenario Manager tasks not set by the GUI?
No.
But it doesn't mean fiddling with the Manger itself would be horrendous. There are ways to teach and learn with it, but also if you save a macro enabled document, users should be able to turn the macro on with the click of a button - so VBA can be an option too
I hope this helps?

Excel Dynamic Chart Data Selection with Sliding Window

I'm new to Excel and macros/VBA and I've been trying to arrange create a graph with the aid of a table. This first part is fairly simple and easy and has been described several times all over the internet. I followed Mr. Peltier's tutorial and it works just fine when it comes to adding new data.
How does one create a graph from a table with a fixed number of rows and only using the data from the last 3 columns of the table? Is it possible to automate this process everytime a new column is added with a macro/VBA?
Basically I want to change the source data of my graph to the last 3 Columns.
I know this concept is known as a sliding window, but I haven't got much sucess searching for this type of use of sliding windows in Excel. Most the examples I've seen use the offset function and apply this concept of sliding windows to simple functions such as sums and what not.
Thank you.
Edit: this has been answered in
https://peltiertech.com/dynamic-chart-source-data/#comment-1465235
See the last comments

Excel Files and Visual Basic

I have never used Visual Basic before but could do with a pointer on where to begin.
I have 750 excel spreadsheets that contains various amounts of data of different types. The columns are always the same, but the number of data rows vary per spreadsheet. I need to extract data and put it into two new spreadsheets.
Obviously to do this 750 times manually would be a nightmare. I just want to run a script that can do it for me and thus thought of Visual Basic although i've never used it before.
My specific questions are:
What type of command should i research that would allow me to copy data where the row number to start at varies (as data above varies in no of rows). There is a title before this new data - how can i get it to search for this title and then choose the row below?
Would all my spreadsheets have to be in one folder so that the script goes through them all, or can i have some kind of folder structure in that folder too?
Anyone recommend any good resources for me to get to grips with visual basic and grasp what i need to do?
thanks
Tom
So the compilation task got easier with the introduction of MS PowerQuery. If you are using MS Excel 2013, you already have this. If no, you should download it and use the extension from MS.
The following guide outlines how to Using Power Query to Combine Data from Multiple Excel Files into One Table. This means that with Power Query (PQ), MS has taken and enabled easy aggregation using a few simple button clicks. PQ is a lightweight alternative to a lot of tasks that used to require VBA.
In this example, you will use PQ to point to an entire folder (750 should be no problem) worth of commonly formatted Excel files. The only limitation is that each data file should have a similarly named tab.
I won't repeat the details of the guide for how to do it, as it is in-depth and visual. But if you run into issues, get in touch.

how to display data that is related to a specific cell in excel 2010?

I have created 2 columns, the first has a category of a system using data validation, and the second has the description and failures of that system.
The purpose of that is to open a malfunction on some parts.
In a different sheet I wish to do the same only this time I want to choose the system and the description will automatically appear in the next column showing me all the malfunctions I have written on this system.
I am not very good at all the functions of excel. but I still searched for one that might help me. I have tried using the DGET function but it got me nowhere.
Perhaps try the solution here - it's a bit tricky to explain without copy-pasting the whole thing:
https://superuser.com/questions/536234/excel-how-to-vlookup-to-return-multiple-values
Also take a look at vlookup() if you're working across spreadsheets.
As expected, all of the responses you've seen ehere - and probably elsewhere - are ponyers to VLookup, or a refusal to answer your question.
I'm guessing that you're using DGET() because you need to retrieve data from one named column, using a match for a search term in another named column; and you're that because you can't rely on column ordinals or addresses - you have to do it by name.
VLookup won't do that for you: not without extremely complex and fragile array formulae.
The bad news is: Microsoft NEVER published a working example of a DGET() formula or any corresponding VBA Worksheet Function code.
There's page after page of descriptive text and general explanation in the helpfiles and on MSDN: but no working example. Nobody in Redmond ever sat down and made the DGET() function work with a reproducible set of function parameters and published a screen-shot the working formula.
I'll let you guess why that is.
Maybe there's an example somewhere that is, in effect, a VLookup implemented for known column ordinals using DGET(). If there is, I never found it and you won't either: and it would, of course, be useless for any application where you're working with field names instead of known ordinals.
What you need to do is capture the tabulated data range, with field names in the top row, and pass it to a SQL query using ADODB or MS-Query. That bad new for that is that all the MS-JET Excel drivers have a fatal memory leak.
After that fails, you're left exporting the data somewhere that a proper database app can run the SQL: and that's actually the right thing to do, because your attempt at using DGET() is a relational data query.
If you're left with the need to do this entirely in Excel, you have reached a level of desperation normally associated with the last survivor of an airplane crash who, having devoured the charred remains of his unlucky fellow passengers, is finally forced to contemplate the awful exigency of opening and eating the inflight catering meals.
The grisly details for the equivalent in Excel are a Horrible Hack published here:
http://excellerando.blogspot.com/2014/09/from-time-to-time-it-necessary-to.html

How to compare 2 complex spreadsheets running in parallel for consistency with each other?

I am working on converting a large number of spreadsheets to use a new 3rd party data access library (converting from third party library #1 to third party library #2). fyi: a call to a UDF (user defined function) is placed in a cell, and when that is refreshed, it pulls the data into a pivot table below the formula. Both libraries behave the same and produce the same output, except, small irregularites can arise, such as an additional field being shown in the output pivot table using library #2, which can affect formulas on the sheet if data is being read from the pivot table without using GetPivotData.
So I have ~100 of these very complicated (20+ worksheets per workbook) spreadsheets that I have to convert, and run in parallel for a period of time, to see if the output using the new data access library matches the old library.
Is there some clever approach to do this, so I don't have to spend a large amount of time analyzing each sheet to determine the specific elements to compare?
Two rough ideas that come to mind:
1. just create a Validator workbook that has the same # of worksheets, and simply do a Worbook1!Worksheet1!A1 - Worbook2!Worksheet3!A1 for every possible cell on each sheet
2. roughly the equivalent of #1, but just traverse the cells in the 2 books using VBA, and log any cells that do not match.
I don't particularly like either idea, can anyone think of something better than this, maybe some 3rd party utility I could buy?
Sounds like its time for a serious fundamental redesign rather than swapping data access libraries.
But, to address your question:
- I don't think a 3rd party utility to do this exists.
- a VBA approach to do this using variant arrays to get the used-range from each sheet would be reasonably easy & efficient as long as you don't try to traverse the sheets cell-by-cell.

Resources