Google Sheets: Extract Last Characters from String

Return the last number of characters of a string function LAST_VALS(str,num){  if(num >= str.length){    return str;  }  return str.slice(str.length – num); } The provided code defines a function called LAST_VALS that takes two parameters: str and num. The function returns the last num characters from the str string. Here is a detailed explanation of how … Read more

YouTube Channel Top Tips

Remember, growing a YouTube channel takes time and effort. Be patient, adapt your strategies based on the feedback and data you receive, and continue to provide value to your audience.

Calculate the factorial of a given number

The given code consists of two functions: FACTORIALVAL and test1. Let’s break down each function and its purpose: FACTORIALVAL(val): This function calculates the factorial value of a given number val. It first checks if the val is equal to 0. If it is, the function immediately returns 1. This is the base case of the … Read more

Calculate the distance between two sets of latitude and longitude coordinates

The code defines a function called DISTANCE_BETWEEN that calculates the distance between two geographical coordinates on the Earth’s surface using the Haversine formula. Here’s a step-by-step breakdown of the code: Define a constant earthRadius with a value of 6371, representing the Earth’s radius in kilometers. Calculate the difference in latitude (dLat) and longitude (dLon) between … Read more

Add a new column before and after in sheets

function addColumn() {const ss = SpreadsheetApp.getActiveSpreadsheet();const sheet = ss.getSheets()[0];const sheetName = sheet.getName();sheet.insertColumnBefore(1);const lastCol = sheet.getMaxColumns();sheet.insertColumnAfter(lastCol);sheet.getRange(1,1).setValue(‘FIRST’);sheet.getRange(1,lastCol+1).setValue(‘LAST’);Logger.log(lastCol);} https://github.com/lsvekis/Google-Apps-Script/blob/main/2023Apr/Add%20a%20new%20column%20before%20and%20after%20in%20sheets

Youtube Marketing Tips

Here are top tips for YouTube marketing in full detail with steps to achieve a better ranked channel: Here are some additional tips that can help you achieve a better ranked channel: More tips for YouTube marketing: By following these tips, you can increase your chances of success on YouTube. Just remember to be patient, … Read more

How to Grow Your YouTube Channel

How to Grow Your YouTube Channel Growing a YouTube channel requires a well-planned strategy that takes into account various factors such as content creation, audience engagement, promotion, and optimization. Here is an outline of a YouTube channel strategy that can help you grow your channel: By following these strategies, you can grow your YouTube channel … Read more