Last active
February 18, 2022 04:39
-
-
Save Tomokatsu-Sakamoto/8f6bb98051c765274c50bafdad365446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var value; | |
function myFunction( ) { | |
var sheet = SpreadsheetApp.getActive( ); // スプレッドシート | |
var cellNow = sheet.getCurrentCell( ).getValue( ); | |
Logger.log( 'セルの内容 : [' + cellNow + ']' ); | |
Logger.log( '変数の内容1 : [' + value + '] , [' + Number( cellNow ) + ']' ); | |
if ( value == undefined ) { | |
value = 0; | |
Logger.log( '変数の内容1 : [' + value + '] , [' + Number( cellNow ) + ']' ); | |
} | |
value = value + Number( cellNow ); | |
Logger.log( '変数の内容2 : [' + value + ']' ); | |
sheet.getCurrentCell( ).setValue( cellNow ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment