Hi ,
Our Company recently migrated from google to MS. I am new to MS power automate. I am looking for solution to create a script / flow to copy from range or table and paste it on last row of another sheet . I manage to convert google script to VBA but I am having issue with excel online script . Any help will be appreciated.
Source Sheet - Shift Logs-PM6 Target Sheet - Mill Issues
Working google script:
function moveDataR() {
// Get handles to Daily and Archive sheets
var dailySheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Shift Logs-PM6');
var appendSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Mill Issues');
// Create range strings for the rows in Daily and Archive sheets
var dailySheetRange = "Shift Logs-PM6!11:" + dailySheet.getLastRow();
var archiveLastRow = dailySheet.getLastRow() + appendSheet.getLastRow();
var archiveAppendRange = "Mill Issues!" + (appendSheet.getLastRow() + 1) + ":" + archiveLastRow;
// Get range of data to copy
var destRange = dailySheet.getRange(archiveAppendRange);
// Copy the data to the archive sheet
var sourceDataValues = dailySheet.getRange(dailySheetRange).copyTo(destRange, {contentsOnly: true});
}
Current VBA code working on desktop excel:
Sub CopyActiveRow()
Range("B11:G26").Copy
With Sheets("Mill Issues").Range("A" & Rows.Count).End(xlUp).Offset(1)
.PasteSpecial (xlPasteAll)
.PasteSpecial (xlPasteValues)
ActiveWindow.SmallScroll Down:=-15
Range("F4").Select
End With
End Sub