User Posts: Mehrab Imtiaz
0
Pivot Table Formatting in Google Sheets (3 Easy Ways)
0

Pivot tables are perhaps one of the most important data presentation tools that a spreadsheet application can have. The focus word here is presentation. A ...

0
How to Sort a Pivot Table in Google Sheets (An Easy Guide)
0

Many ask the question: Can you sort data in a Pivot Table in Google Sheets? The answer is a resounding yes. While simple, there is justification to this ...

0
How to Insert a Timestamp in Google Sheets (An Easy Guide)
0

In this tutorial, we will look at how we can insert a timestamp in Google Sheets. There are multiple approaches we can take, taking into consideration ...

0
How to Apply a Date Picker in Google Sheets (An Easy Guide)
0

Spreadsheet applications like Google Sheets rely heavily on dates having the correct format since wrong dates entered can have huge implications later down the ...

0
How to Use the DATE function in Google Sheets (An Easy Guide)
0

In this simple tutorial, we take a deep dive into the DATE function of Google Sheets. We will discuss its importance and see a few of its uses as examples ...

0
How to Format Date with Formula in Google Sheets (3 Easy Ways)
0

Date formats in Google Sheets usually depend on the regional or locale settings. Most commonly mm/dd/yyyy for the United States and dd/mm/yyyy for the United ...

0
Generate Automatic Date in Google Sheets (3 Easy Ways)
0

In this tutorial, we will show you how to insert or generate an automatic date in Google Sheets. While the task itself is quite simple, it is the attached ...

0
Apply an Automatic Timestamp Using Google Sheets Script (3 Easy ways)
0

In this tutorial, we will look at how we can apply an automatic timestamp in Google Sheets using Apps Script. But first, let’s start with the basics. What is ...

0
How to Autofill Date in Google Sheets (A Comprehensive Guide)
0

This article looks to serve as a comprehensive guide discussing all the ways we can use to autofill a date in Google Sheets, starting from simple built-in ...

0
Autofill Date when a Cell is Updated in Google Sheets (3 Easy Ways)
0

This is a simple guide to show you a few ways you can use to autofill a date when a cell is updated in Google Sheets. While there are functions and shortcuts ...

0
How to Sum a Duration of Time in Google Sheets (An Easy Guide)
0

In this article, we will discuss how to sum the duration of time in Google Sheets. At first glance, the idea may seem simple, but a certain level of ...

0
How to Autofill or Continue Dates in Google Sheets (An Easy Guide)
0

One of the best features that Google Sheets has to offer is its autofill feature. It is smart enough to understand what type of data the user needs as well as ...

0
How to Use the EOMONTH Function in Google Sheets (An Easy Guide)
0

If you want to generate the last day of a month which falls before or after a specified number of months, then the EOMONTH function of Google Sheets is the ...

0
Find Number of Days in a Month in Google Sheets (An Easy Guide)
0

Finding the number of days in a month in Google Sheets is a matter of simply understanding how the application perceives dates and using a combination of ...

0
How to Use the DATEVALUE Function in Google Sheets (An Easy Guide)
0

The DATEVALUE function is a great way to extract or generate the underlying date code of a date in Google Sheets. This date code is the raw representation of a ...

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