User Posts: Mehrab Imtiaz
0
Sort by Row in Google Sheets (2 Basic Ways)
0

There are no definite or built-in ways to sort by row in Google Sheets. All we can do is look for workarounds to sort this unique arrangement of data, a couple ...

0
How to Sort by Value in Google Sheets (With Examples)
0

In this article, we will look at all the ways in which we can sort by value in Google Sheets. Let’s get started. The 2 Types of Values that can be ...

0
How to Sort by Number in Google Sheets (4 Ways)
0

In this article, we look at a few ways in which we can sort by number in Google Sheets. To fully cover everything, we have used multiple approaches depending ...

0
Using the SORT Function in Google Sheets (With Examples)
0

The SORT function in Google Sheets is a fundamental, yet very handy function to know about. And we are going to be breaking down its uses in this article ...

0
SORT Function for Multiple Columns in Google Sheets
0

Today, we will look at how we can use the SORT function to sort for multiple columns in Google Sheets. We will look at different use cases that are common for ...

0
How to Sort Numerically in Google Sheets (3 Ways)
0

Today, we will look at the different ways to sort numerically in Google Sheets. We will be using both in-application options and functions to achieve our goal. ...

0
How to Sort by Multiple Columns in Google Sheets (3 Ways)
0

Today, we will look at how to sort by multiple columns in Google Sheets. While most users will think about the Sort Range option, which we will be discussing ...

0
How to Sort Alphabetically in Google Sheets (3 Ways)
0

Knowing how to sort alphabetically in Google Sheets is a fairly simple deal. However, if something seems simple it usually means that there are multiple ways ...

0
Find Cell Reference in Google Sheets (2 Ways)
0

Today, we will look at a couple of ways with which we can find cell references in Google Sheets, focusing on the ones that can be found in formulas. Let’s ...

0
Relative Cell Reference in Google Sheets
0

Understanding relative cell reference in Google Sheets. or any other spreadsheet application, is considered a starting point for any aspiring user. Cell ...

0
Variable Cell Reference in Google Sheets (3 Examples)
0

Today, we will look at the different scenarios where we use a variable cell reference in Google Sheets. While the idea is simple, utilizing it can get quite ...

0
Reference Another Tab in Google Sheets (2 Examples)
0

Today, we will look at a couple of different scenarios where we reference another tab in Google Sheets spreadsheets. Knowing how to reference another tab is a ...

0
Reference Cell in Another Sheet in Google Sheets (3 Ways)
0

Today, we will look at all the ways we can reference cell in another sheet in Google Sheets. We will first touch on the fundamentals of referencing cells then ...

0
How to Query Cell Reference in Google Sheets
0

Today, we will look at how we can apply a query cell reference in Google Sheets. To give a better understanding, we will use multiple scenarios and examples to ...

0
Return Cell Reference in Google Sheets (4 Easy Ways)
0

Today, we will look at all the ways to return cell reference in Google Sheets. We will utilize some functions that are not often used in day-to-today ...

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