I have a spreadsheet and I need to increase dates in the ranges G5:G27 , T5:T27 , AG5:AG27 , AT5:AT27 by one month. I want to create a button to run this script as i will be copying the sheet and then wish to just press the button to update all the dates by 1 month.
我只是想建立一种公式,将日期从上表上提高,而另一个单元则依靠日期小组。 如果我使用一个公式,用日间为时日子的囚室就没有将其改为天。
任何帮助都将受到高度赞赏。 谢谢!
我先尝试使用盘点清单,并做一次旁观或旁听器,但只是把日期列入下面所有囚室的最高牢房。
我早就修改了我的法典,我甚至可以再次这样做。
Edited: This is what I have so far. I am able to copy the dates over into the next column but I don t know how to add a month to the dates.
function date()
{
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName( Sheet11 );
var date = new Date();
var valuestocopy = sheet.getRange(1, 5, 25, 1);
var copyto = sheet.getRange(1, 6, 25, 1);
sheet.getRange(copyto.getA1Notation()).setValue(date).setNumberFormat("M/D/YY");
copyto.setValues(valuestocopy.getValues());
}
[![此处插入图像描述]]