My company is switching from Microsoft Office to Google Docs, I have this (several) code I want to use in Google Spreadsheets but I have no idea on how to do that.
C
The function is structured like this:
Private Sub Worksheet_Change(ByVal Target As Range)
Statements here
End Sub
That would probably convert to something like:
function Worksheet_Change(ByVal) {
Statements Here;
};
Instead of End Sub the function in JavaScript ends with a curly brace }.
Instead of End If, the If, then statement also ends with a curly brace }.
if (condition) {code here;}
That's the syntax for a JavaScript If statement. There is no Then key word in JavaScript.