obquxnfv
obquxnfv

Reputation: 11

Select one cell and by clicking a button change value of a different cell

I want to insert a button into my google spreadsheet, that, when clicked, copies the content of the selected cell to another cell. Is there any way to do this?

I tried googling for a solution myself, but I'm overwhelmed by all sorts of different scripts/macros/addons that are available.

Would be amazing if you could help me out on this one.

Upvotes: 0

Views: 858

Answers (1)

player0
player0

Reputation: 1

you will need a script for this purpose like:

function moveValuesOnly1() { 
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 var selection = SpreadsheetApp.getActiveSpreadsheet().getSelection();
 var currentCell = selection.getCurrentCell();
 source.copyTo(ss.getRange("Sheet2!B1"), {contentsOnly: true}); }

which copies selected cell from selected sheet into B1 cell of Sheet2

and then just go Insert > Drawings and create a button. when done link the script with button and you are done.

Upvotes: 2

Related Questions