I have a large dataset that expands by time, could reach 100k entries if not more. and I'm using a combination of Index and Match to view a mini-table from another table based on the key element that indicates the needed data.
My data exists in a table in a separate sheet, what I need to do is whenever I type in A1 for example, a specific serial "AA1", it should look up for the sheet table where the column named "serial" is, and return with all matching outcome with that serial.
The issue is this process should be multiplied in 15 columns over 100k rows.
and here's the formula I use for each column/row:
=IFERROR(INDEX(Sheet!$A:$A,SMALL(IF((Sheet!$O:$O=!$A$1),ROW(Sheet!$A:$A)-ROW(Sheet!$A$2)+2),ROWS($1:1))),"")
The reason why I use the full column index "$A:$A" is because as I said earlier, it's a very large dataset and it is expandable over time. if I made it $A1:$A100000 , it will process 100k entries even if there are no values past-50k for example, which will indeed slow down the sheet performance.
but using full column became even worse, the sheet is VERY SLOW updating between each element. and I need the sheet to calculate automatically, not manually. Please advise if there's a better solution or a better integration to view data based on key elements.
Here's an example of my sheet, what I want to do is whenever I type 15, the second table auto generates the co-related data from the other sheet with the key element "15", to be filled accordingly across A, B, C and D.
Imagine the same process over 100k entries, and instead of A, B, C and D; it's from A to Z. literally.
Related
What I would like to achieve is that sellers can choose the STORE in the blue cell (either with a drop down list or by hard-typing the STORE name) and, based on the selection on the blue cell, the available POSITIONS for that particular PRODUCT and that particular STORE are show in the green cell as a drop down list.
Let's say I have an Excel workbook, which contains a worksheet with this table with products data, which is automatically imported daily from our Nav server with this layout. It has 4 columns including PRODUCT CODE, DESCRIPTION, STORE IN WHICH IT CAN BE LOCATED and POSITION INSIDE DE STORE (please, check screenshot). It contains 1.5k rows and it changes dynamically, for example, new items are added or positions are exchanged.
As you can see, the same product (PRODUCT 2) can be located in several stores (STORES 1, 2 and 3), and it can be in several locations on each store (POSITIONS 2, 3, 1 and 4).
Now I need sellers to report which of these items they pick and from where, not only the STORE but its POSITION inside the store too. They do it with another worksheet inside the same Excel workbook. It looks more or less like this (please, check screenshot).
I know the drop down list is achieved via Data Validation but I can't figure out the formula for this. I have tried several approaches like:
Array formula to return all POSITIONS in the same ROW, following this (Formula 2.): https://www.ablebits.com/office-addins-blog/2017/02/22/vlookup-multiple-values-excel/. It is quite slow to calculate on the 1.5k items and, once done, I can't figure out how to make Data Validation to look for the 4 or 5 or 10 POSITIONS returned by the array formula, which also need to be filtered by STORE (please, check screenshot for the closest that I have been, array formula returning POSITIONS from column E).
Same formula as above directly on the Data Validation list box, which returns only the first POSITION found.
VBA custom fucntions which are not allowed in the Data Validation box.
I feel comfortable with both Power Query and VBA, and forumla as well, and can adapt most of the code I see but I don't know why I just can't figure out how to achieve this, maybe it is only I am blocked or something but every path I start to follow ends up in a dead end.
Does anyone have an idea on how to approach this? It doesn't really seem that complicated but it is becoming impossible for me.
Thank you very much for your time!!
This is what I have finally done, just in case someone else is facing this situation.
Instead of a plain-text table for the POSITIONS, I created a PowerQuery importing that CSV. Named that worksheet _LOCATIONS.
Added a custom column (Column E) combining the PRODUCT and the STORE so I had something like a Unique Identificator, resulting something like this but in PowerQuery.
Combined column:
Sorted column E and sub-sorted column D, so I make sure the list will always be ordered as I need, and saved the query.
Then, in worksheet REPORT, I entered this formula to create the drop down list in Data Validation in cell D2:
OFFSET(_LOCATIONS!$D$1,MATCH($A2&"-"&$C2,_LOCATIONS!$E:$E,0)-1,0,COUNTIF(_LOCATIONS!$E:$E,$A2&"-"&$C2))
And I am able to choose from the available POSITIONS for the selected PRODUCT in the selected STORE.
Brief explanation:
I set the reference for the OFFSET function in the very first POSITION (D1), and then I move it the amount of rows detected by the MATCH function (which searches for the "PRODUCT 2-STORE 2" string in the newly created combined column) minus 1 (PoweryQuery table has headers) and 0 columns. This leaves me on the first occurrence of my string (but on the POSITIONS column). Then I make the offset as high as the amount of rows detected by the COUNTIF function (which counts all occurrences of my PRODUCT-STORE pair), returning an array of all the positions (column D) matching the PRODUCT-STORE pair.
Ask for formula in Spanish if you need it.
I am having two tables, one table (table 1) below is main data, separated into many columns and blocks per 10 rows in one, as you can see A2:A11, A12:A21 and so on (many rows and columns) ... In Column A are unique numbers, but one number per block as a unique, and all other information in other columns can differ, sometimes will be more data sometimes not. The data is always same structured.
What I am looking is to have report / printable sheet where I will have all my columns on one sheet, but in a Column A2 for instance drop down list that will use all unique numbers from main data table and populate all matches on report page, same as it is on picture below. There are many columns that should work automatically when I choose something from "Number" drop down. The trick here is, there must be 10 rows per block also, I have organized it as it should be, but I can't figure out how to populate using functions. So, you can imagine clicking one drop down and getting those lists updated without scrolling endlessly through columns and rows on main data table...
Where I have a problem is that I am getting matches only for first rows but not whole rows (or all rows where matches are) ...
using this function:
=INDEX(Table1[Datum];SMALL(IF(Table1[Nummer]=Printable!$A$2;ROW(Table1[Nummer])-ROW(INDEX(Table1[Nummer];1;1))+1);1))
If someone can help me out, I would be happy!
Try below formula. After putting formula to cell drag down and across as needed. I have tested this formula in Excel2013 and with range (not as table). So, you have to adjust formula for table. I suggest you to first test the formula in single sheet like my screenshot and if it is successful then go for table in Report sheet.
=INDEX(INDEX(B:B,MATCH($G$2,$A:$A,0)):INDEX(B:B,MATCH($G$2,$A:$A,0)+9),ROW(1:1))
I have a spreadsheet with two portions, the first's rows are usernames and columns are data types (availability, ID, email etc), the second's rows are the data types and columns are the usernames. The second's values must be calculated based on what is in corresponding cells in the first. The second isn't simply copied from the first, each cell contains calculation based on multiple columns of the first portion.
I have been asked to keep these as they are currently, as in don't just create new new columns in the first portion or rotate the second.
So my question is: is there a way that I can copy a function across columns in a way that the variable changing by column is the row number not the column number?
I know the thing I'm trying to do makes no sense. Makes no sense to me neither, but this is what I've been asked to do.
Ended up using a whole bunch of INDIRECT(ADDRESS(MATCH, MATCH)) functions to get the values then get the desired values from them into the second portion.
A second table or extra column would've been so much cleaner but hey, to each their own.
I have a large spreadsheet with rows that do get rearranged a few times of a year (few hundred lines). I also have a Visio document that basically maps these rows with simple boxes and connectors. Boxes are basically a value from one column (say column B), and connectors represent values from another column (say column F).
I have also added row Id's on each of these connectors, aside from the value column F, however, as I said, the rows do get rearranged, so I was wondering if there was a way to create a variable and use it as part of a text in each of these connectors to go incrementally. This is to avoid modifying the row Id's when new ones are added, or they get rearranged.
I'm not looking for Visio to parse the Excel sheet. Simply to have a dynamically incremental variable that I can use to shift these numbers up and down in my Visio, so when I see the old value of, e.g. Val_from_Column_F (3), and now the same row has been moved to, say, row 12, now I need to display, Val_from_Column_F (12) -- a difference of 9. And have every other value in Visio to get incremented by 9 accordingly. That way, every row after 3, gets incremented equally by 9 and represents the current rows in the spreadsheet.
I have two tables in Excel.
Table 1 includes unique identifiers and valuable information on those identifiers in one condition. However, the unique identifiers can be listed multiple times (if the condition changes).
Table 2 records separate information, but I want it to use the unique-identifiers from Table 1 and return some of the information listed in Table 1. I can easily use either VLOOKUP or INDEX and MATCH to do so, and it of course returns the information from whichever condition is listed first (if the unique ID appears multiple times).
I can see the logic of maybe using an AND statement (combined with IF) to match the condition from columns in Table 1 and Table 2, but how do I then force my formula to only return the information when that AND statement is true? What I absolutely do not want to do is make the duplicated identifiers more unique by combining them with the condition.
Also, all of this is qualitative data/character strings.
Edit 10/23/14
I had a request for a visual. In it's simplest form, I'm trying to duplicate the information from Table 1 in Table 2 (though in truth both tables have mutually exclusive data).
So if I have entered individual clients entry into different programs in Table 1:
And then in Table 2, I want column C to recognize that if the identifier is paired with the specific program label in column A (I have six programs, hundreds of identifiers), it will print the entry date appropriate for that Client in that Program:
The simplest way may be to insert a new ColumnA into the sheet (say Sheet1) that holds your first table, say:
=B2&"|"&C2
copied down to suit. This would then serve as a key for a lookup formula such as:
=VLOOKUP(B2&"|"&A2,Sheet1!A:D,4,0)
in C2 of your other sheet, copied down to suit.