Womdering if you can help me, Macros are not my strongest haha.
This is what I currently have...
function PP() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A2:D2').activate();
var currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).activate();
currentCell.activateAsCurrentCell();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('All'), true);
spreadsheet.getRange('A2').activate();
spreadsheet.getCurrentCell().getNextDataCell(SpreadsheetApp.Direction.DOWN).activate();
spreadsheet.getRange('A12').activate();
spreadsheet.getRange('Project!A2:D10').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
spreadsheet.getRange('E2').activate();
currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).activate();
currentCell.activateAsCurrentCell();
currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).activate();
currentCell.activateAsCurrentCell();
spreadsheet.getRange('E2').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
spreadsheet.getRange('A1').activate();
spreadsheet.getActiveSheet().getFilter().sort(1, false);
};
I have 2 tabs 'Project' and 'All", what I want to do is 1 - Select everything in 'Project' tab (Less the headers) (Columns A-D, Rows Unknown) 2 - Copy 3 - Paste at the bottom of 'All' 4 - Copy Formula in Column E in 'All' to the new additions
Please let me know if you can help
Thanks Mark
This is what I currently have...
function PP() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A2:D2').activate();
var currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).activate();
currentCell.activateAsCurrentCell();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('All'), true);
spreadsheet.getRange('A2').activate();
spreadsheet.getCurrentCell().getNextDataCell(SpreadsheetApp.Direction.DOWN).activate();
spreadsheet.getRange('A12').activate();
spreadsheet.getRange('Project!A2:D10').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
spreadsheet.getRange('E2').activate();
currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).activate();
currentCell.activateAsCurrentCell();
currentCell = spreadsheet.getCurrentCell();
spreadsheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).activate();
currentCell.activateAsCurrentCell();
spreadsheet.getRange('E2').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
spreadsheet.getRange('A1').activate();
spreadsheet.getActiveSheet().getFilter().sort(1, false);
};
I have 2 tabs 'Project' and 'All", what I want to do is 1 - Select everything in 'Project' tab (Less the headers) (Columns A-D, Rows Unknown) 2 - Copy 3 - Paste at the bottom of 'All' 4 - Copy Formula in Column E in 'All' to the new additions
Please let me know if you can help
Thanks Mark