英文:
Dragging down Arrayformla
问题
=ARRAYFORMULA(IMPORTRANGE("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ/edit", "C2") & " " & IMPORTRANGE("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "K2") & " " & IMPORTRANGE("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "L2"))
英文:
I have a Arrayformuöla and importrange to import the data in the cell from an spreadsheet to another spreadsheet. I have figured out how and it works. But i have to write or copy paste the formula to each cell down manually and making after the Changes.How can I drag down the formula to fill out autonatically? I have on spreadsheet 1 in cell C2 K2 and L2 data and I want to transfer the 3 Ciollumns to another spreadsheet in the same cell. As i said it is working but if i drag down the formula instaed of c3 k3 l3 to fill out it still the same.
this is my formula
=arrayformula(importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ/edit", "C2") & " " & importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "K2")& " " &importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "L2"))
答案1
得分: 0
这将进入工作表的第二行,您使用此公式的工作表;例如,假设您将其粘贴到单元格 A2
中,那么源工作表的 C2,K2,L2
将被拉入,并且当您向下拖动时,数据的后续行将自动被拉入。
如果您的工作表语言环境使用分号 ;
而不是逗号 ,
,则您可能需要在公式中将所有的逗号 ,
更改为分号 ;
。
尝试:
=lambda(z,join(" ",index(z,row(),1),index(z,row(),9),index(z,row(),10)))(importrange("14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ", "C1:L100"))
英文:
This goes into second row of the sheet you are using this formula; like lets say you paste this in Cell A2
then C2,K2,L2
of the source sheet are pulled in & as you drag it down subsequent rows of data are auto-pulled.
If your sheet locale uses ;
convention instead of comma
then you may want to change all the ,
in the formula.
Try:
=lambda(z,join(" ",index(z,row(),1),index(z,row(),9),index(z,row(),10)))(importrange("14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ", "C1:L100"))
答案2
得分: 0
有多种方法可以实现这个。基本上,您不是直接操作单元格,而是处理引用单元格位置的文本。这就是为什么它不会拖动。其中一种方法是使用字符串管理,并将其关联到行号。例如,如果您位于第二行:
=arrayformula(importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ/edit", "C" & ROW()) & " " & importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "K" & ROW()) & " " & importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "L" & ROW()))
如果您从第三行开始,可以将 ROW()
更改为 ROW()+1
。
但我建议只执行一次IMPORTRANGE,并使用BYROW进行连接。假设您需要处理前100行:
=BYROW({importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ/edit", "C2:C100"), importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "K2:K100"), importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "L2:L100")}, LAMBDA(imported, TEXTJOIN(" ", 1, imported)))
这将更加高效。如果有用,请告诉我。
英文:
There is more than one way to do that. Basically you're not working with cells specifically but to text that refers to the location of a cell. That's why it doesn't drag. One with be with string management and associating it to the number of row. For example, if you are positioned in the second for row:
=arrayformula(importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ/edit", "C"& ROW()) & " " & importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "K" & ROW())& " " &importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "L" & ROW() ))
You could change ROW() with ROW()+1
if you were starting in row 3 for example.
But, what I'd suggest is to do only once the IMPORTRANGE and use BYROW to do the joining. Let's say you need it until row 100:
=BYROW({importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgcQ/edit", "C2:C100"),importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "K2:K100"),importrange("https://docs.google.com/spreadsheets/d/14cyHIzdBHSFa4hgj0S0bCIFk7CC-zSw4g3ngI7UNgc/edit", "L2:L100")}, LAMBDA(imported, TEXTJOIN(" ",1,imported)))
It would be much more efficient. Let me know if it's useful
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论