Search code examples
google-sheetsgoogle-sheets-formula

Using Named Functions with New Google Tables


I'm using the new Google tables in Google sheets. The name of my table is DB. One of my columns is Type and several columns are names of different properties. One of the options for the Type field is Income. I want to create a named function that sums up all rows with type Income for a given property.

My Named Function settings are as follows:

  • Function Name: INCOME
  • Argument Placeholder: property
  • Formula Definition: = sumif(DB[Type],"Income",DB[property])

This formula definition is saying "formula parse error".

What should the correct formula be?

EDITED: Here is a working example: Google Sheets Example

The answer should be $35. The correct formula (without using named functions) is below the table.

Here is a snippet of the attempt to enter the named function: Named Function Description


Solution

  • Change:

    = sumif(DB[Type],"Income",DB[property])
    

    To:

    =SUMIF(db_type, "Income", db_property)
    

    The named function should look like this:

    SAMPLE

    I've used db_type and db_property as the Argument placeholders because using DB[Type] and DB[property] gives out the message Underscores are the only allowed special characters. This could be the reason why you're getting the Formula parse error; check formula syntax message on the Formula definition earlier.

    OUTPUT

    OUTPUT