I am trying to copy data from a sheet (SheetA) to another sheet (SheetB) However, I need the row of the cell to be copied (From Sheet A) to be based off of another cell.
For example: SheetA has data on A1, A2, A3, A4 etc... SheetB has a cell (B1) that a user types in a value. When the script is run the data from SheetA will be copied from column A and a row based off of the value in B1 to SheetB. So if a user types "5" into B1 and runs, the data from A5 will be copied from SheetA to A1 on sheetB
Here is a script that I have so far, how do I modify this correctly to complete the code?
//Moves data from SheetA -> SheetB;
SheetA.getRange("?").copyTo(SheetB.getRange("A1"));
What do I have to replace where the '("?")' is?
Thank you!