June 18, 2022 at 3:49 pm
Good Morning,
I have programmed a SQL coding that copy "z" data under the "a" data but the number "a" rows can change (It finishes row number 16 in my example below but it can finish row number 25)
I have added below the coding that I had programed
Can you change my coding in order to include the change that I want to carry out ?
function azerty() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('L5').activate();
var currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.NEXT).activate();
currentCell.activateAsCurrentCell();
currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).activate();
currentCell.activateAsCurrentCell();
spreadsheet.getRange('D11').activate();
spreadsheet.getCurrentCell().getNextDataCell(SpreadsheetApp.Direction.DOWN).activate();
spreadsheet.getRange('L5:Q10').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
};
Thanks for your help
June 18, 2022 at 4:17 pm
Hello and welcome to the forum. As your question relates to spreadsheets (Google Sheets?) rather than SQL Server, which is the subject of this forum, this may not be the best place to submit it.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
June 18, 2022 at 5:37 pm
hello, but the coding related to the script used in the spreadsheet is SQL
June 18, 2022 at 5:59 pm
there is no SQL code on your post - only something that looks like VBA.
so do go post on a VBA or Google Sheets forum where there are bound to be people that know how to work with it.
Posting here is likely not going to get you anywhere.
June 18, 2022 at 6:40 pm
so how can I do to delete this thread ?
June 18, 2022 at 7:56 pm
It can't be deleted. No worries there, though. It can actually help others if they end up with a similar question.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply