User Posts: Mehrab Imtiaz
0
Indirect Sheet Name in Google Sheets (Easy Steps)
0

In this article, we will look at how we can use an indirect sheet name in Google Sheets. This helps to refer to multiple sheets, all the while keeping the base ...

0
Indirect Range in Google Sheets (3 Easy Ways)
0

Today, we will look at how to pull data from an indirect range in Google Sheets. Just a disclaimer, this article focuses on cell ranges, not values of ...

0
Cell Reference From String in Google Sheets
0

Today, we will look at how to get cell reference from a string in Google Sheets. Our main methods revolve around the INDIRECT function. We have also added a ...

0
Google Sheets: Use Cell Value in a Formula (2 Ways)
0

Today we will look at how we can use cell value in a formula in Google Sheets. The general idea revolves around cell references, but we will go the extra mile ...

0
Dynamic Cell Reference in Google Sheets (Easy Examples)
0

Today, we will go through an in-depth guide of how to use a dynamic cell reference in Google Sheets, for both within the same worksheet or reference cells from ...

0
Protect Range in Google Sheets (Easy Examples)
0

Today, we will look at how to use the Protect Range option in Google Sheets. We shall implement it for two scenarios: the first for a range of cells in a ...

0
Protect Sheet From View in a Google Spreadsheet (2 Ways)
0

Today we will be looking at the ways to protect a sheet from view in a Google Sheets spreadsheet. The idea and process are simple but very important for the ...

0
How To Lock Rows In Google Sheets (2 Easy Ways)
0

Today, we will look at how to lock rows in Google Sheets in two different ways. First, the basic way with Protect Range option and the other, more ...

0
Conditional Locking Of Cells In Google Sheets (Easy Steps)
0

You can never get enough protection for your crucial spreadsheets. To that end, we believe, you can’t get any safer than the conditional locking of cells in ...

0
How to Lock a Column in Google Sheets (Simple Examples)
0

Today, we will look at how to lock a column in Google Sheets in the most basic way available to us in the application. As an extra situational example, we ...

0
How to Use SUMIF in Google Sheets (With Examples)
0

SUMIF in Google Sheets is one of the core functions in the spreadsheet software. Its application is numerous, of which we will be seeing more of in this ...

0
Count Non-Empty Cells in Google Sheets (4 Easy Ways)
0

The ability to recognize and count non-empty cells in Google Sheets is very crucial if you are looking to avoid some silly errors. And today, we will be ...

0
How to Search in Google Spreadsheet (5 Easy Ways)
0

Google Sheets allows us to perform searches for data and values in many different ways. So today, in this article we look at how to search in Google ...

0
Sort By Column in Google Sheets (3 Easy Ways)
0

Today, we are going to discuss how to sort by column in Google Sheets. We discuss three unique methods, each with their respective pros and scenarios where ...

0
How to Sort by Date in a Google Spreadsheet (2 Ways)
0

Today we are going to be looking at two separate ways of how we can sort by date in a Google Sheets spreadsheet. The processes are fairly simple no matter ...

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