User Posts: Mehrab Imtiaz
0
COUNTIF Contains Text in Google Sheets (4 Ways)
0

In a practical scenario, you will often have huge amounts of data in your spreadsheets. In such a situation finding certain text in this huge database can be a ...

0
COUNTIF From Another Sheet in Google Sheets
0

It is more than likely that a workbook or spreadsheet may have multiple worksheets with various data organized and spread across it. It is also possible that ...

0
COUNTIF Multiple Criteria in Google Sheets (3 Ways)
0

A veteran in Excel will tell you how powerful the COUNTIF function and all its iterations are. The same importance is carried over to Google Sheets. In this ...

0
Count Duplicates In Google Sheets (3 Ways)
0

When working with spreadsheets there will come a time when you will need to count duplicates in your data, whether it be for extraction or removal. In this ...

0
Highlight Duplicates in Google Sheets (4 Ways)
0

The ability to highlight duplicates in any worksheet is crucial for a variety of reasons. While it may sound easy to do, it can prove to be very complex if you ...

0
Change Row Color Based on Cell Value in Google Sheets (4 Ways)
0

Any type of formatting based on cell values or conditions can be easily done by the Conditional Formatting option of Google Sheets. To show you how to ...

0
Reference Another Workbook in Google Sheets (Step-by-Step)
0

Contrary to popular belief, barring certain confusing aspects of spreadsheets, how to reference another workbook in Google Sheets is fairly simple. We are ...

0
Pull Data From Another Sheet Based on Criteria in Google Sheets (3 Ways)
0

No matter how much of an expert you are, many still sometimes find it difficult to extract data from one worksheet to another. Exponentially so when conditions ...

0
Lock Cell Reference in Google Sheets (3 Ways)
0

One of the problems that many bookkeepers, financiers, or anyone who works with worksheets will have in common is the understanding and the application of ...

0
How to Insert Multiple Rows in Google Sheets (4 Ways)
0

Inserting rows may sound like a pretty straightforward task, but one wrong move or one wrong click on your precious worksheet may end up in disaster. So ...

0
How to Lock Cells in Google Sheets (4 Ways)
0

Access and collaboration are two of the main driving forces behind Google Sheets and the other applications in the line. As easy as it can be to share your ...

0
How to Merge Rows in Google Sheets (3 Ways)
0

Merging cells in a spreadsheet is one of the more fundamental skills to have. But things might get complex when certain patterns of merges are involved. So ...

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