I have recorded a macro that adds formula onto the end of a cell
function addpricemultiplier() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('H5:1000').activate();
spreadsheet.getCurrentCell().setFormula('=0.3*GOOGLEFINANCE("CURRENCY:USDAUD")');
spreadsheet.getRange('H5:1000').activate();
};
The problems I have are that it will only change if the value is =0.3
, I am unsure how to change it so that it will add the formula on no matter what, and of less importance I have made the macro from H5 onto 1000, I am unsure if there is a way to make it just go on as long as the sheet is there instead of pre determining where it will go to.