I've been trying to find a list of the built in MS Excel functions that calculate "Whole Column" formula efficiently but haven't been successful, any ideas where I can go for this information? What i mean by this is exemplified below:
This documentation suggests that SUM and SUMIF formula automatically pick up on the last row of data, thus meaning that there is no efficiency reason why using a more restricted or dynamic range is preferable.
https://msdn.microsoft.com/en-us/library/office/ff726673(v=office.14).aspx#xlAllowExtraData
Answers for Excel 2003/7/10 are all welcome.
I think it would be fair to assume that ALL excel functions behave as teh article describes (ie the same as SUM and SUMIF). (I wasn't aware of this article, but it makes sense when you think about it...)
Behind the scenes the data in cells is stored in OO data structures such that only cells with non-default values and formatting will have been created.
It's highly probable that the value data and formatting data are help in separate containers.
So when Excel is using a formula on a range it is working on the data structures and consequently only works with the cells that have values.
I hope that a whole column with cells having different formatting (but very values) does not cause the SUM and SUMIF formulas to scan through every cell.
If in doubt you could do an experiment with the formulas you want to use.
The link you gave talked about formulas that behave differently and explicitly named VBA user created functions and array formulas - which makes sense.
Also, note that the article says using "Structured Table References" is the best approach. (ie not only storing your data in ranges but storing your data in excel tables. Created from a range using Ribbon:INSERT>Table).
These tables will allow any function to be used more efficiently as the range used is limited to the number of rows the table has.
I hope this helps.
Harvey
Related
Using COUNTIF and VLOOKUP, the goal is to count my inventory of Laptops and return the number I have in stock.
My current formula is this:
=COUNTIF($A$3:$A$10000,H4)
As my table only has one entry for "Laptop", the formula evaluates to 1.
The next step was to incorporate some sort of VLOOKUP for quantity. As an example, Row 17 has an entry for "Monitor" with a specific model, with a column E (quantity) value of 5:
Monitor HP Compaq LA1951G 1FL SVR 5
I could use a VLOOKUP here:
=VLOOKUP(H6,$A$3:$E$10000,5,FALSE)
However, I have a second set of monitors with a different model. From what I understand of VLOOKUP, the formula stops evaluating at the first match.
I'm considering simply listing every possible model in our environment and strictly using VLOOKUP only, but this makes my life more complicated.
Any suggestions on a better way of doing this before I do a lot of manual work would be appreciated. I've linked a sanitized copy of my workbook via Google Sheets here.
I believe the SUMIF() function would be more useful here.
Replace the
=COUNTIF($A$3:$A$10000,H4)
with
=SUMIF(A:E,H4,E:E)
Having done this same process for many companies, I suggest you also consider a Pivot Table. It can automatically update, auto-sum everything, and auto-count everything if you've set it up properly.
Pivot Tables also work in Excel and Sheets equally well. Just make sure that you're defining entire Columns of data for the basis of the data sets and it will be dynamic! E.G. Don't do A1:F50, do A:F for your data set definitions.
I have a database of multiple tables and am trying to design an equation in Excel that will return the height of a given toy from a specific manufacturer. What is the best way to go about using two inputs? i have tried working with VLOOKUP() but was unable to tailor it to my needs. I also tried nested IF statements which greatly complicated my equation and will only work with small amounts of data. Is this possible to do in Excel and if so how? The equation in the image below has dropdown selectors which aren't displayed here.
The answer that I'm giving here will require that you rearrange your data tables a little bit, but has the benefit that it can be easily extended later on to deal with any additional data and additional lookup conditions.
Steps:
Move all your data tables into one single contiguous table, and add one additional column for 'Toy type' (as shown below).
Enter the formula as shown below into a cell, but without the outer braces. Then then press Ctrl+Shift+Enter (this tells Excel that the formula is an array formula and results in the braces being added).
The lookup formula in this case is made up from an INDEX and MATCH function. This combination allows you to define multiple lookup-criteria. How this works exactly is explained in more detail here and here.
Well it looks like you've got two lookup tables... So depending on the Toy Type cell, you'd lookup vlookup area1 or area2.
See here
Results
Formula
You might like to make cell B8 a drop down list too if you were to use my layout in Excel rather than Googledocs. See my answer here
You can do a lookup based on the Toy Type to choose the range for your other lookups.
I made a table with ToyType and CellRange. Assuming your Dolls table started at B2 you would have ToyType = Dolls and CellRange = C3:D9 etc.
Then make a lookup using =VLOOKUP(SelectedToyType, NewTableRange, CellRangeColumn, FALSE)
Finally in your Toy Height lookup it would be =VLOOKUP(SelectedToyHeight, INDIRECT(FirstLookup),2,FALSE)
This will let you keep the same basic table structure, and be able to add more toy types / adjust the lookup ranges in the future.
When We write any formula, for specific function, we need to direct excel the specific location of that data. This location is referred as, Cell Reference. We know very well but how this useful and in which scenario it can be used ?
Cell references are way better than replicating a formula many times. It would be simple if you have a small spreadsheet, but what about thousands of complex computations? It is also better as it creates a more automated spreadsheet, such that when one value is changed other values automatically change.
I am new to using Excel formulas.
I have an Excel with alot of formulas like
=IFERROR(VLOOKUP(B9,Data[[#All],[Field Location]:[On Production Date]],4,0),"")
I understand IFERROR function and VLOOKUP function.
What makes trouble understanding is table array in VLOOKUP function which is
Data[[#All],[Field Location]:[On Production Date]]
What this table array represents and how can I create something like this?
These are structured references. You can read more at:
Using structured references with Excel tables
Structured references make it much easier and more intuitive to work
with table data when you are using formulas that reference a table–
either portions of a table or the entire table. They are especially
useful because table data ranges often change, and the cell references
for structured references adjust automatically. This minimizes the
need to rewrite formulas as rows and columns are added and deleted in
a table, or when external data is refreshed.
Data[[#All],[Field Location]:[On Production Date]]
is the equivalent of giving a range. $Field Location2:$On Production Date1000, ($A2:$B1000)
assuming there are 1000 rows in your table. Writing the formula in this way will automatically include any new rows added to your Data table.
Data[[#Header],[Field Location]] is equivalent to $Field Location1. Or $A$1.
In Excel, you can give names to certain ranges. Just mark an area, and then on the top left (below the menu), you can enter a name in a drop-down-box.
This name can then subsequently be used in referencing the range, like it is shown in your formula.
This is more intuitive than writing A2:G98, and even more, when you insert new rows into the range, then they will automatically be included.
Is it possible to show the sequence in which formulas are processed in a Excel-sheet with many complex formulas?
In my case this is important because the formulas have dependencies to each other and I need to find out the sequence in which the formulas could be processed one after another.
Thanks in advance.
Excel dynamically adjusts the calculation sequence in such a way as to resolve the dependencies, and normally only recalculates the subset of formulas that are dependent on volatile or changed cells. In Excel 2007 and later this sequence is calculated in a multi-threaded way.
So in practical terms trying to determine the calculation sequence in a large complex workbook is not a good idea.
For more information see http://www.decisionmodels.com/calcsecretsc.htm and associated pages
Excel calculation order within formula
Excel calculates in a specific way within each formula. From the Microsoft documentation it will process from left to right but will process brackets (Aka parentheses) first. Excel evaluates in order of BODMAS
Excel calculation order between formula
Excel will determine which formula are independent of others and calculate those first. This includes formulae referring to cells that only contain values or forumulae that reference constants or volatile functions.
Finding the processing sequence
For starters, this is also known as tracing dependencies (and precedents). In Excel, in the formula tab on the ribbon you can access the audit functions that allow you to trace dependents or precedents. These will point you at the formulae that will be calculated before or after a given cell. This gives you the ability to step through the order so that you can ensure it's correct. For more detail on this I recommend this Microsoft article