SOLVED AND WORKING!!
This is a solution I thought of to grab some rows at any point in a long list, and copy those over to another sheet I use to Archive older projects, and it works great.
I use basically the same thing in another script to then delete the project from the original sheet after its been copied over to the Archive.
There is no prompt, but the script reads from two pre-determined cells, A1 and A2, where the user enters what that range is, (top of project and bottom of project, the project is always 16 rows), so the two numbers are always 16 in range.
The sheet with over 100 projects, each 16 rows, so there can be 1,600 plus rows in this one sheet, and I can grab any project in that list, by just entering the top row of that one project, and the bottom row in that long list,
example: I enter 575 in cell A1, and 590 in cell A2.
The script knows to look for those 2 cells (A1 and A2), reads the numbers 575 and 590, turns that into a string range, copies that range and pastes it into the Archive sheet.
The Archive sheet is Locked, but this code also unlocks that sheet, pastes it, re-locks the sheet back, then goes to that sheet so the user can confirm the project got copies over correctly.
Then it clears those values from cells A1 and A2 after its done so it doesn't get accidentally copied or deleted if someone hits the script button by mistake.
I have over 10 engineers using these scripts, with their own sheets, each engineer can have over 100 jobs, so this works from within any sheet, and always copies the older jobs to the top of the Archive sheet in rows 4:19, which bumps down any existing archived jobs.
Hope this helps others its really solved my problem.
Here is the code:
// Archive A Project
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();
let archive = workbook.getWorksheet("Archive");
//Assign the Archive worksheet to the ws variable
let ws = workbook.getWorksheet("Archive");
//Unprotect worksheet without password
ws.getProtection().unprotect();
let cell = selectedSheet.getRange("A1");
let cell2 = selectedSheet.getRange("A2");
// Read the value from the source cell
let cellValue = cell.getValue();
let cell2Value = cell2.getValue();
// Store the source cell value as a variable
let myVariable = cellValue;
let myVariable2 = cell2Value;
let numRows = myVariable2 - myVariable + 1;
let lastRow = 4 + numRows - 1;
let dstAddress = "4:" + lastRow.toString();
let srcAddress = myVariable.toString() + ":" + myVariable2.toString();
archive.getRange(dstAddress).insert(ExcelScript.InsertShiftDirection.down);
archive.getRange(dstAddress).copyFrom(selectedSheet.getRange(srcAddress));
// Paste to range 4:19 on archive from range 4:19 on archive
archive.getRange("4:19").copyFrom(archive.getRange("4:19"), ExcelScript.RangeCopyType.values, false, false);
// Clear ExcelScript.ClearApplyTo.contents from range A1 on archive
////archive.getRange("A1").clear(ExcelScript.ClearApplyTo.contents);
//Relocking the Archive sheet
//Unprotect worksheet without password
ws.getProtection().protect();
// Go to Archive to Confirm
workbook.getWorksheet("Archive").activate();
}