I have a main spreadsheet where I'm keeping the full set of my data.
I would like each regional manager (eg NZ) to have their own spreadsheet (workbook) that:
So far I understand that best function for this task is probably the importrange
function:
=importrange(spreadsheet_key, range_string)
Question is how to dynamically generate the range_string
- an updating range that targets all rows that match the region of interest?
Furthermore - do they have to be in the same workbook?
答案 0 :(得分:1)
您可以使用echo parseString('NNLLLLLLLNNNLNLNNNN');
和QUERY
的组合。例如在" NZ" A2中的工作表,您可以IMPORTRANGE
只要第1列(A)中的行不为空(=QUERY(IMPORTRANGE("Main Spreadsheet URL","Sheet Name!Range"),"Select Col1, Col3, Col4 where Col1<>'' and Col4='NZ' order by Col3 asc",0)
),就会将第1列(A),第3行(C)和第4行(D)中的所有行拉入新的电子表格中然后第4列(D)中的一行等于&#34; NZ&#34; (Col1<>''
)然后按列3(C)(Col4=NZ
)中的升序排序数据进行排序。
您也可以更换&#34; NZ&#34;在具有单元格引用的公式中,如下例所示。
order by Col3 asc