User Posts: Mehrab Imtiaz
0
Google Sheets: Custom Number Format (A Comprehensive Guide)
0

The Custom Number Format feature of Google Sheets serves to add additional formatting rules to number values in the application. These formatting rules are ...

0
How to Format Cells to Fit Text in Google Sheets (2 Ways)
0

In this article, we will look at how we can format cells to fit text and other values in Google Sheets automatically. But first, let’s understand the ...

0
Google Sheets: The VALUE Function (An Easy Guide)
0

In this article, we will look at how to use the VALUE function in Google Sheets. It is one of the simplest functions available in the application and its ...

0
How to Format Cell Size in Google Sheets
0

In this article, we will look at how we can format the cell size in Google Sheets with examples following some basic scenarios. When you open a Google ...

0
Google Sheets: Convert Value to Number (3 Easy Ways)
0

This article will look at how to convert any value to a number in Google Sheets. There are many ways to do so, from formatting the cell to utilizing ...

0
Google Sheets: Convert String to Number (4 Easy Ways)
0

Google Sheets has multiple ways to convert a string to a number. It can be as easy as using built-in functions or features of the applications or going deeper ...

0
Google Sheets: Convert Time to Number (3 Easy Ways)
0

This article will look at how to convert time to a number value in Google Sheets. It can be in hours, minutes, or seconds in decimal form. Fundamentally, ...

0
How to Change a Number Format in Google Sheets (An Easy Guide)
0

While Google Sheets has a few default number format options to change to, it is only scratching the surface of its capabilities. The application allows the ...

0
How to Format Currency in Google Sheets (An Easy Guide)
0

In this article, we will show you how to add and format currency values in Google Sheets. Currency is just another numerical value that conveys a different ...

0
Google Sheets: Convert Text to Number (6 Easy Ways)
0

In this article, we will show how to convert a text value with a number value in Google Sheets. Knowing how a value is formatted is quite important when ...

0
Format a Number with a Formula in Google Sheets
0

To format a number with a formula in Google Sheets can be crucial as many users can have different requirements and formatting styles in mind. These small but ...

0
Format Numbers as Text in Google Sheets (5 Easy Examples)
0

Working with numbers in a spreadsheet can be quite tricky especially when we want to customize them to our requirements. In these cases, it can be a good idea ...

0
How to Add Commas to Numbers in Google Sheets
0

It can be crucial to add commas to numbers in Google Sheets in the correct position to convey the meaning behind the digits. Whether it be a currency, ...

0
How to Remove Numbers from a String in Google Sheets
0

Unlike MS Excel, Google Sheets allows the use of regular expressions to find and directly work with alphanumeric values from a cell, of course with specific ...

0
Remove Formula to Get Only Values in Google Sheets (3 Methods)
0

It is a given that most official spreadsheets contain a lot of data and in turn contain a lot of formulas. The thing is, having a lot of compound formulas like ...

Browsing All Comments By: Mehrab Imtiaz
  1. Hello,
    If you want to specify which column’s changes will trigger the timestamp, all you have to do is include an IF ELSE statement inside the existing one. For example, let’s say that the SL column is Column A in the sheet:

    if(sheetName == 'Stock'){
        if(range.getColumn() !== 1) return
        else{
          var new_date = new Date();
       spreadSheet.getActiveSheet().getRange(row,4).setValue(new_date).setNumberFormat("MM/dd/yyyy hh:mm:ss");
        }
    }
    

    So, if changes are made to any column other than column A or 1, no timestamps will be triggered.

    For multiple triggers, we recommend different scripts for each.
    I hope it helps!

  2. Hi Max,
    I am assuming that you are thinking about extracting the letters ABC from ABC-123. In this case, you can approach it in two ways without even using wildcards.
    The first way is to use text functions to extract the number of characters from the string:

    =LEFT(B2,LEN(B2)-4)

    The LEN(B2)-4 removes the last 4 characters from the string.
    For a more dynamic approach, you can look for the hyphen/dash as a delimiter to remove characters before or after it. In this case, to get ABC from ABC-123, the formula will be:

    =MID(B2,1,FIND(“-“,B2)-1)

    Just replace “-” with any delimiter of your choosing.
    However, if you still want to extract using regular expression to get ABC from ABC-123, use this:

    =REGEXREPLACE(B2,”[0-9-]”,””)

    The regular expression to remove all digits and hyphens is given by [0-9-].
    I hope this helps!

OfficeWheel
Logo