I am trying to compare string values that I have obtained from my google spreadsheet.
My Months appear in this format \" Jun13\", \"Aug13\" etc. and my script has tr
try that:
function test(){
var ss = SpreadsheetApp.getActive().getSheetByName("month test");
var data = ss.getRange(2,2,ss.getLastRow(),3).getValues();
var ListOfMonths = new Array();
for(var i in data){
var row = data[i][0].toString();
if(ListOfMonths.indexOf(row)==-1){
Logger.log(row+" is not referenced. Adding it");
ListOfMonths.push(row);
}
}
Logger.log(ListOfMonths);
}