Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
215 views
in Technique[技术] by (71.8m points)

SELECT and COPY row to another SHEET in Google Spreadsheets

I'm currently working on a Spreadsheet, and I'm up to the point of creating either a button or checkbox to SELECT and COPY a row to another sheet as part of an efficient archiving system. For e.g. the user will select their row, click the button and the row will be copied in the mentioned sheet. I'm still quite new to scripting in Google Spreadsheets as a whole. I personally wanted to head into the direction of using a button, but I'm open to suggestions.

Thank you all!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think that works (you will be assigning a script/function to an image you upload, and then in the function use .getRow() on the active cell). Here is some advice that could save you some time. For your use case, instead of using a button, consider using the QUERY command:

You have a table in "sheet1" with some columns:

enter image description here

In that table you have an IMPORT column. You can use data validation on that column so that it is a Yes/No dropdown as well.

In a separate sheet, you write this which picks out all the rows with "Y":

=query(sheet1!A2:D1000,"select A,B,C where D='Y'",0)

And that will output this (minus the headings, which you can customize based on the last argument of the QUERY command):

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...