I am looking for a solution that capitalizes each word of the input string to cell seperated by blank space or dot (similar to proper function). I know it is broken but what I tried so far:
/*Capitalize Firt Letter of Each Word of input String in Cell*/
if(activeRow > 1 && activeCol == 3 && ss.getSheetName() == validSheet && activeCell.isBlank() == false)
{
var inputVal = activeCell.getValue().toString();
Logger.log(inputVal);
activeCell.setFormulaR1C1("=PROPER("+inputVal+")");
}
Example:
Input for cell A2:
this tExt neEds to be fixed
Output (Desired Result) for cell A2:
This Text Needs To Be Fixed
Thanks in advance
Edit 1: I noticed that proper function won't work because it requires cell value in it.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)