AI Formula Builder: Top 5 Use Cases

Published: May 8, 2023 - 6 min read

Hannah Recker

Spreadsheets remain the most flexible interface for manipulating and analyzing data. With 1+ billion users worldwide, spreadsheets allow business users to easily leverage functions, charts, and pivots to generate insights and solve problems.

However, building formulas in spreadsheet platforms such as Google Sheets still requires work. For some users, generating formulas is time-intensive. Other users lack the skills to produce complex formulas.

That’s why an AI formula builder is valuable, whether you’re an expert or a beginner.

An AI formula builder allows users to describe the formula they want to build as text. The formula builder automatically transforms these instructions into spreadsheet formulas.  

Our users keep requesting this feature, and we’ve been listening. Recently, we recently announced our Formula Builder — a free AI-powered, text-to-formula creator available in Coefficient.

Read this guide for a full overview of Coefficient’s Formula Builder, including how it works, how to set it up, and key use cases.

Video Walkthrough: How to Use Formula Builder in Google Sheets

What is Formula Builder?

Coefficient’s Formula Builder is an AI-infused, text-box assistant that converts textual descriptions into Google Sheets formulas. The Formula Builder is located on the Coefficient sidebar.

Pasted image 0

The way it works is simple. Just describe the Google Sheets formula you want to generate in the text box, in plain English. And the Formula Bot will automatically generate the corresponding formula for Google Sheets.

The Formula Builder is designed for lightweight usage; you can seamlessly leverage the tool as you navigate your spreadsheet. Now let’s take a look at how to set up Formula Builder in Google Sheets.

How to Set Up Formula Builder

To use Formula Builder, you need to install Coefficient. Coefficient is a free Google Sheets add-on that allows you to import data from your business systems — such as Salesforce and HubSpot — into Google Sheets.

Here’s a walkthrough on how to install Coefficient and launch Formula Builder.

First, click Extensions from the Google Sheets menu. Choose Add-ons -> Get add-ons. This will display the Google Workspace Marketplace.


Search for “Coefficient”. Click on the Coefficient app in the search results.

Pasted image 0

Accept the prompts to install.


Once the installation is finished, return to Extensions on the Google Sheets menu. Coefficient will be available as an add-on.


Now launch the app. Coefficient will run on the sidebar of your Google Sheet.

Pasted image 0

Select GPT Copilot on the Coefficient sidebar.

Pasted image 0

Then choose Formula Builder.

Pasted image 0

The Formula Builder will open.

Pasted image 0

Type a description of a formula into the text box. Then press ‘Build’.

Pasted image 0

The Google Sheets formula will appear below the prompt box.

Pasted image 0

Paste the formula into a cell to produce the result.

Pasted image 0

Formula Builder: Top 5 Use Case Examples

Now let’s examine some practical use cases of Formula Builder using a real dataset. Let’s import a dataset from Salesforce into Google Sheets. We can pull the data using Coefficient.

Coefficient is a Google Sheets add-on that allows you to instantly and automatically pull data from your business systems, such as HubSpot, Tableau, and Looker, into your Google spreadsheet.

Let’s import a sales dataset featuring sales pipeline metrics.

Pasted image 0

Read our blog on how to connect Salesforce to Google Sheets for a full overview of the process.

Now, without further ado, here are five key use cases for Formula Builder, based on the example Salesforce dataset above.

1. Automatically Extract Email Domains

First, let’s extract the domains from the email addresses in column A into the ‘Email Domain’ column (column I).

Pasted image 0

The process is super simple. Just open Formula Builder in Coefficient. Now type Get email domain from column A into the text box.

Pasted image 0

Press ‘Build’ to generate the formula.

Pasted image 0

Paste the formula under the “Email Domain” column and drag the formula down. This will extract the domains from all the emails in column A.

Pasted image 0

2. Display Won Amount for Each Account

Now, let’s display the amount of revenue won for each account. You can calculate this by leveraging the TRUE/FALSE values in column G.

Pasted image 0

Open the Formula Builder and type in this prompt: If column G equals true, return column B value.

Pasted image 0

Now click ‘Build’. You should receive a formula such as this:

spreadsheet ai
Free AI-Powered Tools Right Within Your Spreadsheet

Supercharge your spreadsheets with GPT-powered AI tools for building formulas, charts, pivots, SQL and more. Simple prompts for automatic generation.

Pasted image 0

Now paste the formula into the “Won Amount” column (column J) and drag it down.

Pasted image 0

The blank cells represent the value of deals that are not closed won (i.e. $0).

3. Calculate Days Since Opp Created

Next, let’s calculate the days since each opp was created. We can do this using column C (Created Date):

Pasted image 0

Navigate to Formula Builder and type in: Calculate days since date in column C.

Pasted image 0

Press ‘Build’ and a formula such as this will appear:

Pasted image 0

Now paste the formula into column K (Days since Opps Created?) and pull it down.

Pasted image 0

Column K will now display the days since each opportunity was created.

4. Number of Deal Types

For this next example, let’s count the number of deal types across all the accounts. We can do this using the Opportunity Type column.

Pasted image 0

Launch Formula Builder and enter the following prompt: Count the number of times column H equals cell M7.

Pasted image 0

Formula Builder will produce a formula like this:

Pasted image 0

Now paste the formula in your spreadsheet. Note: in this example, cell M7 is equal to “New Business”. We referenced the cell instead of the text string because we want to drag the formula down.

Pasted image 0

Drag the formula down to count the number of Existing Business deals and Expansion deals as well.

Pasted image 0

This will give you a complete count of the number of deals by opportunity type.

5. Generate Amount Won by Deal Type

For our final example, let’s calculate the amount won for each deal type. This will require us to add the Closed Won deals for each deal type.

Open Formula Builder and enter this prompt: Add column B if column E equals “Closed Won” and column H equals cell M7.

Pasted image 0

In other words, add the deal amount to the sum if the stage is Closed Won and the Opportunity Type equals New Business.

Click ‘Build’ and Formula Builder will produce a formula like this:

Pasted image 0

Paste the formula onto your spreadsheet. Again, we reference the cell M7 instead of the text string “New Business”, because we want to drag the formula down automatically for the rest of the column.

Pasted image 0

Now drag the formula down to calculate the amount won for each Opportunity Type.

Pasted image 0

Voila — there are five key sales use cases for Formula Builder! And this is just scratching the surface of Formula Builder’s potential.  

AI Formula Builder: Write Complicated Formulas with Simple Text Descriptions

Coefficient’s Formula Builder allows you to harness the power of AI in Google Sheets to write complicated formulas with simple text instructions.

These use cases for our Formula Builder are starting points for your own custom usages. Install Coefficient for free now and start leveraging Formula Builder in your day-to-day spreadsheet workflows.  

Sync Live Data into Your Spreadsheet

Connect Google Sheets or Excel to your business systems, import your data, and set it on a refresh schedule.

Try the Spreadsheet Automation Tool Over 350,000 Professionals are Raving About

Tired of spending endless hours manually pushing and pulling data into Google Sheets? Say goodbye to repetitive tasks and hello to efficiency with Coefficient, the leading spreadsheet automation tool trusted by over 350,000 professionals worldwide.

Sync data from your CRM, database, ads platforms, and more into Google Sheets in just a few clicks. Set it on a refresh schedule. And, use AI to write formulas and SQL, or build charts and pivots.

Hannah Recker Growth Marketer
Hannah Recker was a data-driven growth marketer before partying in the data became a thing. In her 12 years experience, she's become fascinated with the way data enablement amongst teams can truly make or break a business. This fascination drove her to taking a deep dive into the data industry over the past 4 years in her work at StreamSets and Coefficient.
350,000+ happy users
Wait, there's more!
Connect any system to Google Sheets in just seconds.
Get Started Free

Trusted By Over 20,000 Companies