[Help] – Chuyển Cột Sang Hàng (bỏ ô trống) (ok)
https://hocggsheet.com/chuyen-cot-sang-hang-bo-o-trong/
function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var nguon = ss.getSheetByName("sheet0");
var dich = ss.getSheetByName("sheet1");
var nguonRange = nguon.getRange(1,1,nguon.getLastRow());
var j = 3;
for (var i = 1; i<=50; i++) {
var giatri = nguon.getRange(i, 1).getValue();
if (giatri != "") {
dich.getRange(7, j).setValue(giatri);
j++;
}
}
}
Video hướng dẫn
Cách 1
Cách 2
Code
Last updated
