User Posts: Mehrab Imtiaz
0
Find if Date is Between Dates in Google Sheets (An Easy Guide)
0

Dates in Google Sheets are stored as integers, making it quite easy to use them for various calculations. And one of these calculations could be to find if a ...

0
Calculate if Date is Before Today in Google Sheets
0

Today we will see how to find and use the condition of if date is before today in Google Sheets. Date calculations are quite common in Google Sheets, ...

0
How to Use Today’s Date in Google Sheets (An Easy Guide)
0

In this simple tutorial, we will look at how we can use today’s date in Google Sheets for different date calculations. We will start with some basic ...

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

The FIND function comes in handy when you want to search for a keyword with a piece of text or string. And with enough understanding and creativity, we can ...

0
How to Remove Special Characters in Google Sheets (3 Easy Ways)
0

When we think about deleting anything from a spreadsheet, we think about deleting the contents of an entire cell. But sometimes we might need to remove partial ...

0
How to Find and Delete in Google Sheets (An Easy Guide)
0

Google Sheets is an application powerful enough to recognize most values and patterns in its spreadsheets, making it that much easier to search for ...

0
Find and Replace with Wildcard in Google Sheets
0

Wildcards can be a staple when it comes to customizing searches in any Google workplace application. So today, we will answer a few questions and discuss a few ...

0
Replace Space with Dash in Google Sheets (2 Ways)
0

Today we have a look at a couple of different ways by which we can replace space with a dash in Google Sheets. One method talks about direct replacement, and ...

0
Find All Cells With Value in Google Sheets (An Easy Guide)
0

In this simple tutorial, we will show you how you can find all cells with value in Google Sheets. Be it any value or specific value (text or otherwise) that ...

0
Find Value in a Range in Google Sheets (3 Easy Ways)
0

Today, we have a look at how we can find a value in a range in Google Sheets. The idea is simple, and we have a few approaches in mind that we can use ...

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

Today, we have a look at a few ways we can use to compare text in Google Sheets. Let’s get started. 3 Ways to Compare Text in Google Sheets 1. Using the ...

0
Insert Page Break in Google Sheets (An Easy Guide)
0

Printing can be easy in a word document file where the page layout is mostly the same as the page you will be printing. But the scenario is completely ...

0
How to Have More than 26 Columns in Google Sheets
0

Unlike MS Excel, Google Sheets provides its users with only 26 columns (A-Z) to work with off the bat. While this amount is more than enough for the average ...

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

Today, we have for you a simple guide explaining how to insert a textbox in Google Sheets. We dive into the nitty-gritty of the “whys” on top of the “hows” as ...

0
Character Count in Google Sheets (An Easy Guide)
0

Knowing how to perform a character count in Google Sheets can often come in handy in many situations. And today we will look at some of these scenarios and ...

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