copy paste values problem

389 viewsScripting


I want to write a script that copy values from column to fill them on another column which has already some values that are filled.

I tried the CellOnly.copy() and CellOnly.paste but it did not work because the column where i want to paste values is not all empty.

Thank you.

Marie Changed status to publish June 25, 2024

Hi Marie, try this script:


if(|Matrix1|.getSelection(destinationCat, |Matrix1::A2|).value == null){

|Matrix1|.getSelection(destinationCat, |Matrix1::A2|).value = |Matrix1|.getSelection(destinationCat, |Matrix1::A1|).value



Tahir Answered question May 16, 2024

Hi Tahir,

Actually, i tried also this solution but it deletes the values from the original column and gets the same values from the other one.

I want a solution that keeps the ancient values and paste the values from the other column in the empty cells.

Marie Answered question May 15, 2024

Hi Marie, the easy way to copy values from A1 to A2 (even if A2 has some values) would be this script:

|Matrix1::A2|.values = |Matrix1::A1|.values


Tahir Answered question May 15, 2024