Salesforce Report Lookup (=salesforce_lookup)

Section header image mobile

The salesforce_report_lookup formula lets you pull one or more field values from a Salesforce report by matching against any field in the report. It’s handy when your report contains pre-filtered or aggregated data that isn’t readily available via object-based queries.

Demo

Syntax

Arguments

Field List Syntax (fields)

Examples

Best Practices & Tips

Common Errors

Demo

Syntax

=salesforce_report_lookup(report_name, lookup_field, lookup_value, fields, settings)

Arguements

Argument Required Description
report_name YES The name of the Salesforce report you want to search.
e.g., "All Opportunities"
lookup_field YES The report column you want to match against. 
e.g. "Opportunity Name"
lookup_value YES The value to match in the lookup_field, e.g. "Acme Inc"
For multiple lookups, provide the entire range as an input, i.e., A3:A100, where these cells contain the Email or Deal Name values, respectively.
fields YES A comma-separated list of fields to return or a cell range (like B1:D1)
settings Optional Comma-separated options. Available: "include_header=true" to return headers in the first row

Field List Syntax (fields_list)

You can:

  • List fields directly: "Opportunity Name, Amount, Stage"
  • Reference a cell range: A1:A3 or B1:D1
  • Field names should match the report column headers (as seen in the report UI)
  • Case-insensitive matching is supported, but best practice is to copy exact field names from the report

Examples:

Look up an opportunity in a report and return its stage

=salesforce_report_lookup("All Opportunities", "Opportunity Name", "Acme Inc", "Stage")

Pull opportunity details using a header range

=salesforce_report_lookup("All Opportunities", "Opportunity Name", "Acme Inc", B1:D1)

Batch lookup using a range of values

=salesforce_report_lookup("All Opportunities", "Opportunity Name", A2:A10, "Stage, Amount")

Best Practices & Tips:

  • This formula is best when your data is already available in a report, especially for joined reports or aggregated views.
  • Unlike salesforce_lookup, this doesn’t query the object schema directly — it relies on the visible rows and columns of the report.
  • You can open the Salesforce report and copy the column headers to ensure your field names match exactly.

Common Errors

Error Message Cause
Report not found The report name is incorrect or inaccessible with your current Salesforce connection.
Field not found in report One or more field names don’t exist in the selected report.
No match found The lookup_value couldn’t be found under the lookup_field.
Salesforce connection requires reauth Open the Coefficient sidebar and reauthorize Salesforce.
Internal error executing the custom function Google Sheets timeout; try simplifying or re-executing the formula.
Was this article helpful? 0 out of 0 found this helpful