A small Apps Script adds two formulas to Google Sheets: =NAARVIN for one figure and =NAARVIN_SERIES for one a month. They read P&L lines, cash, receivables, payables and working capital straight from Naarvin, with an API key that sees only what its role and companies allow. Values are exactly what Naarvin computes, in your reporting currency.
Which formulas does it add?
| Formula | Returns |
|---|---|
| =NAARVIN("EBITDA", "2026-06") | EBITDA for June 2026 |
| =NAARVIN("REV", "2026-Q2") | Revenue for the quarter; ytd and a date range such as 2026-01-01..2026-06-30 also work |
| =NAARVIN("CASH", A1) | Cash at the end of the month in cell A1; a date cell counts as its month |
| =NAARVIN("AR", "2026-06", "entities:<id>") | Receivables of one company; group:<id> names a group |
| =NAARVIN_SERIES("REV", "2026-01", "2026-12") | One figure a month down a column, up to 36 months |
Every line code of your management P&L, such as REV, GP, EBITDA or NI, is a total over the period. CASH, AR, AP and WC are balances at the period's end. The Naarvin menu's Metrics and scopes lists exactly what your key can use.
Can we trust the numbers in the sheet?
They are the engine's own figures, not recomputed in the sheet: the same totals the P&L and balance sheet show in Naarvin, in the organization's reporting currency, with costs positive as in the P&L. Months after the latest data are left empty in a series, never shown as zero.
When Naarvin cannot give a figure, the cell shows an error and its note says why, for example "#NAARVIN: no access to cash" or "#NAARVIN: unknown metric EBITDAX". It is an error, not text, so a SUM over the column cannot quietly skip it. A figure is also refused when an exchange rate is missing, because it would be incomplete.
Answers are kept for five minutes, and Google Sheets recalculates a formula when its inputs change or the spreadsheet is reopened. A sheet can ask for up to 120 figures a minute.
What can the key see?
Only what its role and companies allow. A key is a service account with one role and the companies you choose. Each metric also needs the right that shows it on the dashboard: the P&L, cash, receivables, payables or the balance sheet. A key made for a Saudi entity's sheet cannot read the group. See API and webhooks for how keys are made and limited.
The key is kept in the script's user properties: yours alone, not saved in the sheet, never logged. Sharing the spreadsheet does not share the key.
How do you set it up?
- Create an API keyIn Naarvin, under Settings, Integrations and API, someone who manages integrations creates a key with the role and companies the sheet needs.
- Add the scriptDownload the Apps Script from the same page. In the spreadsheet, open Extensions, Apps Script, replace the editor's contents with it and save.
- ConnectReload the spreadsheet. From the new Naarvin menu choose Connect, enter your organization address and the key, and allow the script when Google asks.
- Write your first formulaType =NAARVIN("REV", "ytd") and compare it with the P&L in Naarvin.
Questions people ask
Does sharing the spreadsheet share our access?
No. The key sits in your own script properties, not in the sheet. Someone else who opens it needs their own key to refresh the figures.
Can a formula change anything in Naarvin?
No. The formulas only read figures.
Is there the same for Excel?
Yes. The Excel add-in gives NAARVIN.VALUE and NAARVIN.SERIES, read with an API key in the same way. See [Excel and CSV](/integrations/excel-and-csv).
