Sub FormatCells() '' e13
Dim x As Integer
Dim y As Integer
For x = 1 To 10
For y = 1 To 5
If Cells(x, y) > 5 Then
Cells(x, y).Interior.color = vbRed
End If
Next y
Next x
End Sub
(function() {
// var oSheet = Api.GetSheet("Sheet1");
var oSheet = Api.GetActiveSheet();
var x = 0;
var y = 0;
for (x = 1; x <= 10; x++) {
for (y = 1; y <= 5; y++) {
var oCell = oSheet.GetCells(x, y);
var value = parseFloat(oCell.GetValue());
if (value > 5) {
oCell.SetFillColor(Api.CreateColorFromRGB(250, 0, 0));
}
}
}
})();