Convert Values to Roman Numerals in Google Sheets with Custom Formula

Convert a number to its Roman numeral equivalent function TO_ROMAN(num){  if(typeof num !== ‘number’) return NaN;  let roman = ”;  const romanValues = {    M: 1000,    CM: 900,    D: 500,    CD: 400,    C: 100,    XC: 90,    L: 50,    XL: 40,    X: 10,    IX: 9,    V: 5,    IV: 4,    I: 1  };  for(let key in romanValues){ … Read more

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