---
title: Using Custom Formulas to Dynamically Pull Data From Salesforce
description: Use custom formulas to dynamically pull data from Salesforce. Step-by-step guide to streamline data retrieval and reporting
---

[Skip to content](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#main-content)

English

Show submenu for translations

![Xappex-logo-with-name.png\]](https://knowledge.xappex.com/hs-fs/hubfs/Xappex-logo-with-name.png?height=40&name=Xappex-logo-with-name.png)

- [Products](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#products)
- [Blog](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#blog)
- [About](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#about)

Open main navigation

Close main navigation

- [Products](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#products)
- [Blog](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#blog)
- [About](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#about)
- English
  
  Show submenu for translations
- Go to xappex.com

 Go to xappex.com

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Xappex Knowledge Base](https://knowledge.xappex.com/?hsLang=en)
2. [I use Google Sheets](https://knowledge.xappex.com/i-use-google-sheets?hsLang=en)

# Using Custom Formulas to Dynamically Pull Data From Salesforce

## Use custom formulas to dynamically pull data from Salesforce. Step-by-step guide to streamline data retrieval and reporting

G-Connector has a built-in formula that you can use to run SOQL queries to populate cell-level data. Here’s an example of one:

*=RUNQUERY(“SELECT sum(amount) FROM opportunity WHERE stagename ='”&B1&”‘”)*

This custom formula run any SOQL query for a single cell. Please, keep in mind that only the value in the first row of the first column will be returned as the result of this formula.

Here’s a video showing how to make such formulas recalculate on demand:

<iframe height="342" src="https://www.screencast.com/users/alex9603/folders/Snagit/media/17e9f436-b628-4d75-8483-802e9928fc64/embed" style="margin: 10px auto; display: block; clear: both;" width="528" allowfullscreen loading="lazy" data-rocket-lazyload="fitvidscompatible" data-lazy-src="https://www.screencast.com/users/alex9603/folders/Snagit/media/17e9f436-b628-4d75-8483-802e9928fc64/embed" data-ll-status="loaded"></iframe>

- [I use Google Sheets](https://knowledge.xappex.com/i-use-google-sheets?hsLang=en)
- [I use Microsoft Excel](https://knowledge.xappex.com/i-use-microsoft-excel?hsLang=en#main-content)

    - [FAQs](https://knowledge.xappex.com/i-use-microsoft-excel?hsLang=en#faqs)
    - [I use XL-Connector](https://knowledge.xappex.com/i-use-microsoft-excel?hsLang=en#i-use-xl-connector)
    - [I use XL-Connector 365](https://knowledge.xappex.com/i-use-microsoft-excel?hsLang=en#i-use-xl-connector-365)
    - [I use Excel Merge package](https://knowledge.xappex.com/i-use-microsoft-excel?hsLang=en#i-use-excel-merge-package)
- [I use Looker Studio](https://knowledge.xappex.com/i-use-looker-studio?hsLang=en)

- [Products](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#products)
- [Blog](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#blog)
- [About](https://knowledge.xappex.com/using-custom-formulas-to-dynamically-pull-data-from-salesforce#about)

[![Chill listening crop-3](https://knowledge.xappex.com/hubfs/Xappex-Logo.svg "Chill listening crop-3")](https://www.xappex.com)

xappex.com Help Center

Copyright © 2026, Xappex LLC