KOKOCAL SCRIPT

Guide

Spreadsheet Formula Generator Panel Guide

A guide for adding a Google Sheets sidebar that builds formulas with selectable function sets, advanced options, preview, copy, and active-cell insertion.

Published: Aug 7, 2026Updated: Aug 7, 2026
One sidebar, selected functions

Choose function sets on the generator page and install one Apps Script bundle.

Duplicate functions merged

Functions included in multiple sets, such as FILTER or QUERY, appear only once.

Preview, copy, and insert

Build formulas in the sidebar, copy them, or insert them into the active cell.

What this generator is for

This generator creates an Apps Script and FormulaGeneratorPanel.html file that add a formula-building sidebar to Google Sheets.

The website generator decides which function helpers to include. Actual formula inputs such as URL, range, conditions, and options are entered in the installed sidebar.

It is designed for frequently used formulas such as IMPORTRANGE, QUERY, IMPORTRANGE + QUERY, FILTER, XLOOKUP, VLOOKUP, SUMIFS, COUNTIFS, TEXTJOIN, and REGEXMATCH.

Form input fields

Menu display language

Language used for the Google app menu and dialog or panel.

Sidebar name

Used for the Google Sheets menu name and sidebar title.

Initial display mode

Choose whether the sidebar initially shows only required fields or opens advanced options too.

Include basic set

Includes IMPORTRANGE, QUERY, FILTER, UNIQUE, and SORT.

Include lookup set

Includes VLOOKUP, XLOOKUP, and FILTER. Duplicate functions are automatically merged.

Include aggregation set

Includes SUMIFS, COUNTIFS, and QUERY.

Include text set

Includes TEXTJOIN and REGEXMATCH.

Include enhanced QUERY set

Includes QUERY and IMPORTRANGE + QUERY for easier filtering and sorting.

Include IMPORTRANGE + QUERY individually

Adds the combined import and query helper regardless of selected sets.

Include XLOOKUP individually

Adds XLOOKUP with match mode and search mode options regardless of selected sets.

Include TEXTJOIN individually

Adds TEXTJOIN with delimiter and ignore-empty options regardless of selected sets.

Setup steps

1

Open Apps Script from Google Sheets

Open the Google Sheets file where you want to add the formula generator, then open Apps Script from Extensions.

2

Paste Code.gs

Paste the generated Code.gs into Apps Script. Back up existing code before replacing it.

3

Create FormulaGeneratorPanel.html

Create an HTML file named FormulaGeneratorPanel and paste the generated FormulaGeneratorPanel.html content.

4

Run initial setup

Select setupFormulaGeneratorPanel from the function dropdown and run it manually. Reload the spreadsheet after it finishes.

5

Open the formula generator

Open the sidebar from the KOKOCAL formula generator menu, then choose a function and build the formula.

Save the implementation guide

After generation, use Download setup guide at the top right of the generated result column to save the information needed for setup. Generated results disappear when you leave the page, so saving the guide before setup is recommended.

What the guide includes

The setup method, post-setup review points, generated script, settings JSON, and config hash are collected in one document. The setup method starts with a note that the generated script appears later in the guide.

Available formats

Choose Markdown (.md), Word (.docx), or the PDF save view.

Post-setup review points

1

Menu appears

Reload the spreadsheet and confirm that the KOKOCAL formula generator menu appears.

2

Duplicate functions are merged

When the basic and lookup sets are included together, confirm that overlapping functions such as FILTER appear only once.

3

Formula preview

Enter required fields for IMPORTRANGE or QUERY and confirm that the formula preview updates.

4

Advanced options

Confirm that QUERY, FILTER, and XLOOKUP advanced options are reflected in the generated formula.

5

Copy and insert

Confirm that Copy writes the formula to the clipboard and Insert writes it to the active cell.

Notes

Important note

Review this point before using the generated script in production.

Important note

Review this point before using the generated script in production.

Review before use

Review this point before using the generated script in production.

Ready to generate the script

Add a sidebar formula builder with selectable function sets, advanced options, formula preview, copy, and active-cell insertion.

Open generator