Home > Software design >  attach one row to a cell's location
attach one row to a cell's location

Time:12-08

I am looking to SORT an IMPORTRANGE() into a spreadsheet and have the cells that aren't imported into the spreadsheet follow along with the imported range. Each cell in one of the imported columns has a unique address. For example, I am importing information into columns A:B, and in column C, there is unique data that needs to follow along with the imported information in A:B in cell C:C. The difficult thing is that in the sheet I am importing from, cells are added weekly.

Is there a way to have the imported range always keep the same row data in it? Hopefully my question makes sense

I have tried: =arrayformula(VLOOKUP(A2:A,QUERY('UNIQUE IDS'!A:C,"select A, B"),{1,2},FALSE)) - this bases what I need to find based on a stationary set of IDs. The problem with this is that it doesn't update the set of IDs that the formula is pulling from, so I would need to update the stationary set of IDs frequently

=sort(filter(query('UNIQUE IDS'!A:C,"select A, B"),query('UNIQUE IDS'!A:C,"select B")="ACTIVE"),1,FALSE) I have also tried this, this doesn't link together the rows at all however, it does give me the option to sort the values how I want them.

I have outlined this in a image

Let's say you have 2 set of data sharing the same column-1 which is data "A", and have a different column-2, which is data "B" and "C".

No matter the data is a range, a query, a filter, or whatever, they are all arrays. As long as you work with the data as an array, you can do anything.

In this example...

  1. we use LAMBDA() to name the 2 data set as DATA_1 and DATA_2,
  2. than use QUERY() to get rid of the extra blanks in DATA_1,
  3. use BYROW() to iterate DATA_1 and lookup matches data in column-1 and return column-2 of DATA_2 as result,
  4. use LAMBDA() to name the lookup result LOOKUP,
  5. use {} to concat the two array side by side and form the output data.

with this formula, no matter how you re-arrange the source data, the result will always match themselves according to the value of column-1 (data "A"), and you can sort the output by column-1 at any given moment if you want to.

  • Related