r/GoogleAppsScript • u/jpoehnelt • Jan 22 '26
Question I’m on the Google Workspace Developer Relations team—I’ll build and share the top-voted Sheets Custom Function ideas from this thread!
The Challenge: Comment below with a custom function idea for Google Sheets that you’ve always wanted written in Apps Script.
The Reward: I’ll take the top-voted ideas, write the Apps Script code for them, and share the source code back here for everyone to use.
Of course it needs to be feasible and a reasonable function! :)
37
Upvotes
14
u/jpoehnelt Jan 22 '26
=REDACT_PII(text)Find and mask sensitive information like emails, phone numbers, or credit card patterns (e.g., user@email.com becomes ****@email.com).
23
u/jpoehnelt Jan 22 '26
=SUM_BY_COLOR(range, color_cell)Calculates the sum of cells in a range that match the background color of a reference cell.
10
u/jpoehnelt Jan 22 '26
=URL_STATUS(url)Returns the HTTP status code (e.g., 200, 404, 500) for a link.
9
u/WicketTheQuerent Jan 22 '26 edited Jan 22 '26
=TROUBLE_SNIFFER(range)Analyze cells in a range for potential performance issues that could slow the spreadsheet in the future, such as a series of formulas that use volatile functions.
2
u/Verolee Jan 23 '26
=ParseNestedJson / =ParseJsonLines
8
u/EarlyFig6856 Jan 22 '26
support joins in QUERY()
1
u/PietroMartello Jan 22 '26
Second thing I'd love to use: formatting a cell using a function. =format( text_or_formula; rgb_fill; borders; rgb_font; font; font_size; ... )
Would that even be possible?
3
u/[deleted] Jan 22 '26
SUMPRODUCTIF you can definitely do conditional sumproducts in hacky ways to get weighted averages but built in would be nice.
1
u/praesentibus Jan 22 '26
`=TABNAME()` returns the name of the current tab.
2
u/Upset-Cauliflower115 Jan 23 '26
Let me refresh =AI() using appscript
1
u/praesentibus Jan 22 '26
`=LOCALTIME()` gets current time but not in the sheet's timezone, but instead in the computer's timezone.
1
u/Verolee Jan 22 '26
What about additional functions to =IMPORTXML? There are 3rd party apps that use additional values within the formula.
1
u/Mark_is_on_his_droid Jan 23 '26
I have always wanted a function that would extract metadata from the change history of a cell, e.g. =CHANGES(A1,[command]) which would display data based on the command. “User” for the user who made the last change in cell A1, “time” to display the time of the change, “change” to show the text description of the change, “all” for all of these elements.
1
u/Verolee Jan 23 '26
=PARSE_JSON ( by Delim, into Rows|Columns)
1
u/Verolee Jan 23 '26
=REGEX_EXTRACT - every match
1
u/_u0007 Jan 23 '26
=AI_VALUE(“prompt”) replaces itself with the output of the prompt as text.
1
u/Three_D_ Jan 24 '26
=CELL_DATA_VALID(address)
Boolean return if cell value passes cell data validation. In other words, tell me if it has one of those barely recognizable little red triangles in the cell.
Thanks!
1
u/Jann_Mardi Jan 25 '26
Add more ratios in the GoogleFinance function such as RSI indicator, Promoter holdings, etc...
1
u/Mark_is_on_his_droid Jan 25 '26
Something that would allow me to use cells as strings within an API call like I can use cells as strings within a sql command using =query()
1
u/DrinkatWell Jan 26 '26
My idea: integrate an AI right into Sheets so you can just talk to it, and it builds formulas, tables, or charts for you automatically.
1
u/Being-Straight Jan 30 '26
Could this be a niche edge case?
I’m not looking for a Sheets formula here,I’m trying to understand whether it’s possible to get more granular locking from Apps Script.
Right now, when I lock with
LockService, it effectively blocks the whole script execution context. In my case, that’s too coarse: my library does CRUD/JOINS operations across multiple sheets/tables (all directed by a .gs), and I usually end up locking the script while a user is actively editing a specific table (sheet). That can prevent the “delivery” of changes because everything is locked, instead of just the resource I’m updating.What I’d love is something like:
Is there any supported approach to “lock at sheet granularity” (even if it’s a pattern/workaround rather than a true lock), or is
LockServicefundamentally limited to script/user/document level locks?1
u/Big-Seesaw-4960 Jan 22 '26
=MATRIXLOOKUP(matrix_range, column_title, row_title)
Looks up a value in a matrix that has both row and column titles. Matches the first instance of the column title to find the column and matches the first instance of a row title to find the row. Returns the single value in that cell. I have to do something similar all the time and I have always wondered why there is no easy, elegant way to do this lookup.
0
u/WicketTheQuerent Jan 22 '26
Does it mean that we should only propose custom functions that can be implemented with the current limitations of custom functions, like the execution time limit and be limited to return plain text? e.g., the following function isn't feasible
=BLINK(text, ms_interval)Show/Hide the text every specified milliseconds.
0
u/devoian Jan 22 '26
Easier importing of photos, especially batches of photos. It's hidden in a menu tree currently, and has to be done 1 at a time.
-1
u/jpoehnelt Jan 22 '26
=READING_TIME(text)Calculates how long it would take to read the text in a cell (based on average words per minute).