Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to copy and paste by using apps script, to the bottom of a list, where the bottom will change after every paste?

$
0
0

I have a system set up in Google Sheets that, from an input produces an output in 'Mover'!K2:V, and that output has to be copied and pasted 'values only' to the bottom of a list on another sheet 'Sheet name'. After that I replace the old input with the new one, and the process repeats. I currently have a hyperlink that positions you exactly where you need to be placed to paste, and it is working. =HYPERLINK("SHEETADDRESS"&range=A"&COUNTA('Sheet name'!A:A)+1,"Placement")

Other people, some of whom are not familiar with Google Sheets at all, will use this system and I'd like to 'foolproof' the system as best I can by setting up an apps script button to copy and paste the range 'values only' with just a click. However I am not too familiar with apps script, so I'm not quite sure how to do it. Is it possible and if so how?

For example, if I were to do one right now, I'd be pasting into a range with 'Sheet name'!A1089 at the top left corner, but if I pasted 3 rows of data into there, the next one would be pasted into 'Sheet name'!A1092. (the number of rows pasted each time is not consistent).


I also have a similar range with a similar current setup, that is also working, but this time we are pasting to one sheet at random from of a range of 18 sheets. I have the sheet name that I want to paste to, automatically generated by functions from the input, in 'Mover'!A2. Is there a way to adjust the apps script from the last situation to handle that? (The range would be the same on every sheet, but the next empty row in that range would not.)


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>