Insert an Incremental Dynamic Value in Visio - ms-office

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.

Related

Can you create a row in Excel using Zapier that includes calculated cells and then retrieve those values?

We use a spreadsheet to generate incremental numbers based on a variable. The variable has 4 different options and each one coincides with a numerical prefix. The first two representing the year.
Option/Prefix
220 (220000,220001,220002 etc.)
227
228
229
There are 4 columns one for each option. When you insert your initials in the correct column, the corresponding number column is incremented by 1 and the correct number is returned. Normally the cells at the right are hidden
This was part of my effort to eliminate duplicate values from being used by accident but it still happens at times so I am trying to set it up to have Zapier monitor our CRM and when it reads a record calling for new number, it will add text to the table in order to generate the number and then retrieve it and insert it into the record in the CRM.
The spreadsheet is on Sharepoint online.
Will formulas be calculated when the Table is updated by Zapier?
How do I find the row afterwards and return the value to Zapier?
When I tried to test the 'find row' action using a value that is the result of a formula the search fails but if it is entered text, the search works.
First to answer the original question, I put the same question to Zapier support and they responded that I might get cached data if I access the file more than once in a short period. So I sought an alternative and came up with this solution:
The process begins with a dropdown in the CRM where the user selects the type of number they require (Trigger Value - TV).
The Zap polls the CRM for changes and is filtered to continue only if a TV exists.
I ended up creating a helper column with the word 'zap' in every cell from the target row and below (A). I also added a column to hold the TV (C) and the zap will updates this column later on. I modified the cells on the right to fill every row with the highest value in each column (I:L) using this formula:
The first part is only to stop the numbers from displaying beyond the target row. The target row is the row in green and is located below the final values. (Row ID:536 in this example)
This is the row we want the Zap to find. The lookup value in the 'Find Row Action' is 'zap' and the lookup column is '1'.
In this example, the next row that the Zap will find and return is 536.
Now, using a Formatter Action (Text), I entered this formula:
Based on the TV retrieved from the CRM, the Formatter will return the value from the corresponding column and increment it by 1. This value will then be returned to the CRM.
The next step is to update the Target Row (ID:536 in this example) in Excel.
It updates Column A (or 1) with the formula ="" which removes the word 'zap' and Column C (or 3) is updated with the TV from the CRM. Now the sheet is ready for the next run.
The last thing is to update the record in the CRM by deleting the TV.
The middle columns (D:G) are not required for the Zap. They are there just to make it easier to see the results if you have to view the file.
In a given year, we will use less than 1500 rows so I copied the formulas down to row 2000. Since the first two digits are based on the year, and because VBA will not run when the hosted file is opened, it will unfortunately require manual intervention to reset the spreadsheet at the beginning of each year. The drawback is that it uses 6 tasks for each number retrieved but at least we won't end up with duplicate numbers being used due to human error.

Is there way to autofill in excel where every blank row in a column is filled with the value of the closest non-empty cell above the blank row?

A simplified example of what I am looking for is a quick way (either a tool or a keystroke) to fill a table where every 5 rows of the first column has a different operator name. The fill would place the first name into the first 5 rows of the table, the second name into rows 6 - 10, and the third name into rows 11 - 15. The images below are a visual representation of before and after the fill.
I am aware of different ways to fill the rows one operator at a time in this example, but is there a way to fill all three in one go? This would be very helpful in larger scale situations. Thanks!
Excel table before filling column A
Excel table after filling column A
Open PowerQuery (Go to Data on the ribbon, Get Data -> Launch Power Query Editor ...) and use Fill Down ...
Result

Multiple Index Match formula slows down excel sheet performance

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.

How can I make a drop down list in Excel 2013 based on several conditions?

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.

Is there an easy way to reformat a poorly-formatted tree to a two-column table?

I have a table representing a series of components and their subcomponents, and the subcomponents' respective subcomponents, and so on. It currently looks like a tree (one-to-many relations), but it could change at some point to resemble a graph (many-to-many relations) instead. Unfortunately, it was poorly formatted by its author, and looks something like this:
The above format is poor because there is a lot of data duplication and it is limited to a set number (4) of tiers. I would instead prefer if it looked something like this:
The above format is nice because there is very little data duplication, and it is not limited to a set number of tiers.
In case there is any confusion about what the tables represent, here is a graphical representation of the data:
It is simple enough to convert from the poor format to the nice format, but there are hundreds of root components, and manual data entry would be far too time-consuming and tedious.
I suspect this problem is unique and I am prepared to write some VBA code myself to parse the table into the nice format, but I thought I'd make sure that this wasn't a common problem with a pre-rolled solution before I rolled my own.
Is there a technical term to describe the poor formatting in the first table? Is there an easier way to reformat the data than to write a VBA macro?
This may be a complete aberration but it works for your sample (and at the moment I don’t have time to break it!)
Add an index (and a label for it) and reverse pivot (eg see An excel formula to find a row/column index in array).
Instead of drilling down on the Grand Totals intercept, drill down on each of the totals for the Tiers.
Reassemble the tables side by side, delete all columns except the Value ones and copy table to another area with Paste Special Values. Remove Duplicates on the range. Every time the value in the column immediately to the right does not change, delete and shift the values in the cells to the left. Reorder the columns right to left.
I copied each pair of adjacent columns in the Tier table (Tier 1 & Tier 2, Tier 2 & Tier 3, Tier 3 & Tier 4) and pasted them stacked vertically into a single pair of columns (Subcomponent & Component).
Next, I removed duplicates by selecting both of my new columns and clicking Remove Duplicates in the Data ribbon tab.
Next, I had to remove all rows which contained a blank cell in the Subcomponent column. To do this, I selected both columns again and filtered the data by clicking Filter in the Data ribbon tab. I selected (Blanks) in the Filter menu on the Subcomponent column and deleted all visible rows. I removed the filer by selecting (Select All) in the filter menu.
The resulting table contained many blank rows, so again I removed duplicates, and then manually shifted the data up one row to displace the one remaining blank row.
In the end, it took about a half hour, which is probably less time than it would have taken me to code a macro, and definitely less time than manual data entry.

Resources