User Posts: Mehrab Imtiaz
0
How to Use TIMEVALUE in Google Sheets (An Easy Guide)
0

Today, we will look at how we can use the TIMEVALUE function of Google Sheets. It is a simple function that can be applied to many different time-related ...

0
How to Convert Text to Date in Google Sheets (3 Easy Ways)
0

In this tutorial, we will look at how to convert a text to date in Google Sheets. The importance of this transformation cannot be understated as many crucial ...

0
Convert Date to Month and Year in Google Sheets (A Comprehensive Guide)
0

In our guide today, we will see how to convert a date to month and year in Google Sheets. We have multiple approaches to this problem, each made easy, in terms ...

0
How to Convert Date to String in Google Sheets (An Easy Guide)
0

Today, in this simple tutorial we will look at how we can convert a date to string in Google Sheets. Beyond direct formatting from the Toolbar, we can go a ...

0
Calculate with Weekdays Only in Google Sheets (An Easy Guide)
0

In our simple guide today, we look at how we can find and calculate with weekdays only in Google Sheets. Thankfully, the application makes it easy for us users ...

0
Calculate Days Between Dates in Google Sheets (5 Easy Ways)
0

Today’s guide focuses on how we can calculate days between dates in Google Sheets. While it is fundamentally simple, Google Sheets allows us to customize this ...

0
Count Days from Date to Today in Google Sheets (5 Easy Ways)
0

Today, we will look at a few ways we can count days from a date to today in Google Sheets. While there are multiple ways to go about it, some may be suited to ...

0
Use DATEDIF from Today in Google Sheets (An Easy Guide)
0

We can approach how we can find the difference in date in Google Sheets in multiple different ways. But perhaps the best way is to use the DATEDIF function. So ...

0
How to Subtract Dates in Google Sheets (An Easy Guide)
0

Dates in Google Sheets are seen as whole numbers, with each day representing one unit. This makes calculations, like how to subtract dates in Google Sheets, ...

0
How to Subtract Months from Date in Google Sheets (3 Easy Ways)
0

In today’s tutorial, we will look at how we can subtract months from a date in Google Sheets, and another month calculation that is commonly used in a ...

0
Find Weekday Name from a Date in Google Sheets (3 Easy Ways)
0

Our tutorial today will focus on how we can find the weekday name from a date in Google Sheets. Google Sheets is very user-friendly when it comes to working ...

0
Add 7 Days to Date in Google Sheets (And More)
0

Date calculations in a spreadsheet are more common than you think. One of the more usual calculations is the addition and subtraction of days and months. But ...

0
How to Organize Google Sheets by Date (3 Easy Ways)
0

Organizing spreadsheets is a fundamental skill to have for any user. And the most common form of organizing a spreadsheet is by date. Thanks to the ...

0
Calculate if Date is After Today in Google Sheets
0

Performing the calculation of dates in Google Sheets is as simple as basic arithmetic since the application views date as integer numbers. Thus, much like ...

0
How to Calculate Tenure in Google Sheets (An Easy Guide)
0

A common misunderstanding that many new users of spreadsheets have is how age is calculated. One might think that a simple subtraction will get the work done. ...

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