Formula library

Spreadsheet Function Reference

Curated spreadsheet formulas with explanations and ready-made snippets for the most common data operations.

Overview

These formulas are tuned for ActionOR's spreadsheet engine. Click **Copy** to drop them straight into your sheet cells.

Core math & basics

Total revenue

Add up a column of revenue values—including blanks safely ignored by SUM.

=SUM(C2:C100)
Average deal size

Return the mean of a range while skipping empty cells automatically.

=AVERAGE(C2:C100)
Round subscription price

Round a value to two decimal places for currency reporting.

=ROUND(C2,2)
Round up to nearest quarter

Force numbers to round up to the next 0.25 increment—helpful for utilization.

=ROUNDUP(C2/0.25,0)*0.25
Round down to dollar

Drop any cents or decimals to keep spend figures conservative.

=ROUNDDOWN(C2,0)
Count populated rows

Count how many entries exist in a column, ignoring blanks.

=COUNTA(A2:A500)
Count numeric values

Restrict counting to numeric cells only, excluding text labels.

=COUNT(C2:C500)
Find smallest KPI

Return the minimum value in a range—useful for spotting dips.

=MIN(C2:C100)
Find largest KPI

Return the maximum value in a range to locate peaks.

=MAX(C2:C100)
Absolute value

Convert negative numbers to positive values before aggregations.

=ABS(C2)
Square root growth factor

Take the square root of a variance metric for volatility analysis.

=SQRT(C2)
Raise metric to a power

Use POWER to calculate exponential adjustments, like compounding.

=POWER(1+C2,12)

Cleanup & validation

Trim and uppercase values

Remove surrounding whitespace and standardize casing for identifiers like region codes.

=IF(LEN(A2)=0,"",UPPER(TRIM(A2)))
Normalize email addresses

Lowercase an email, strip extra spaces, and ensure the field isn't blank before saving.

=IF(ISBLANK(B2),"",LOWER(TRIM(B2)))
Validate date input

Check that a string is a valid date. Returns "Invalid" for malformed inputs so your workflow can branch.

=IF(AND(B2<>"",ISDATE(B2)),"OK","Invalid")
Strip non-numeric characters

Remove any characters except digits before casting a value to numeric types.

=IF(A2="","",REGEXREPLACE(A2,"[^0-9]",""))
Capitalize each word

Standardize names or job titles by trimming spaces and applying proper case.

=IF(A2="","",PROPER(TRIM(A2)))
Detect duplicate entries

Flags repeated values so you can deduplicate lists before automating downstream steps.

=IF(A2="","",IF(COUNTIF($A$2:A2,A2)>1,"DUPLICATE",""))
Limit length

Ensure string content doesn't exceed a character cap before export.

=IF(LEN(A2)>50,LEFT(A2,50)&"...",A2)

Conditional logic

Label status with IF

Classify metrics as "Healthy" or "Needs review" based on a simple threshold.

=IF(C2>=0.9,"Healthy","Needs review")
Nested IF for health scoring

Return different labels depending on which range a metric falls into.

=IF(C2="","",IF(C2>=0.9,"Great",IF(C2>=0.75,"Watch","At risk")))
Combine AND inside IF

Ensure both MRR and NPS thresholds pass before flagging an account as healthy.

=IF(AND(C2>=5000,D2>=45),"Healthy","Needs attention")
Combine OR inside IF

Trigger an escalation if either churn exceeds 5% or incidents are above five.

=IF(OR(E2>0.05,F2>5),"Escalate","")
Negate logic with NOT

Wrap a condition in NOT to invert boolean results.

=IF(NOT(C2="Closed Won"),"Follow up","")
IFS for multi-branch logic

Use IFS to simplify multiple IF conditions for lead qualification scoring.

=IFS(B2>=90,"Hot",B2>=70,"Warm",B2>=50,"Nurture",TRUE,"Cold")
SWITCH for mapping

Map plan codes to human-readable labels without a lookup table.

=SWITCH(A2,"pro","Professional","ent","Enterprise","starter","Starter","Legacy")

Lookup & joins

Customer tier lookup

Fetch a customer's tier from another sheet, returning "Not found" if the ID is missing.

=XLOOKUP(A2,Customers!$A:$A,Customers!$C:$C,"Not found")
INDEX + MATCH inventory lookup

Use INDEX/MATCH to pull the SKU description when the inventory table isn't sorted.

=IFERROR(INDEX(Inventory!$B:$B,MATCH(A2,Inventory!$A:$A,0)),"Missing")
SUMIF by region

Sum values for rows that match a specific region label.

=SUMIF(Sales!$A:$A,$A2,Sales!$C:$C)
SUMIFS by account and stage

Aggregate pipeline value for a specific account and stage combination.

=SUMIFS(Sales!$C:$C,Sales!$A:$A,$A2,Sales!$B:$B,"Closed Won")
Filter open incidents

Return only the rows from Status sheet where incidents are still open.

=FILTER(Status!A:F,Status!C:C="Open")
Region lookup fallback

Classic VLOOKUP example when you only need the third column from the region table.

=IFERROR(VLOOKUP(A2,Regions!$A:$C,3,FALSE),"Region TBD")
Horizontal plan lookup

Use HLOOKUP when plan identifiers span the first row instead of the first column.

=IFERROR(HLOOKUP(A2,Plans!$A$1:$F$3,3,FALSE),"Plan missing")

Aggregation & monitoring

Rolling 7-day average

Compute a 7-day moving average for the metric in column C, ignoring blanks.

=IF(COUNTA(C2:C8)=0,"",AVERAGE(FILTER(C2:C8,C2:C8<>"")))
Alert on churn threshold

Raise a flag when churn exceeds 5% so you can notify stakeholders downstream.

=IF(AND(D2<>"" , D2>0.05),"ALERT","")
Cumulative revenue to date

Running total that accumulates revenue while skipping blank rows.

=IF(C2="","",SUM($C$2:C2))
Weighted pipeline value

Multiply deal amounts by probability percentages to get a weighted forecast.

=IF(SUM(D2:D50)=0,"",SUMPRODUCT(C2:C50,D2:D50)/SUM(D2:D50))
Percent of total

Show each row's contribution to the overall total, ideal for dashboards.

=IF(C2="","",C2/SUM($C$2:$C$50))
COUNTIF high risk deals

Count how many rows meet a single criterion, such as risk = high.

=COUNTIF(Risks!$B:$B,"High")
COUNTIFS multi-criteria

Count opportunities that match multiple filters simultaneously.

=COUNTIFS(Sales!$B:$B,"Enterprise",Sales!$E:$E,">=50000")
90th percentile SLA

Calculate the 90th percentile response time to track near-worst-case performance.

=PERCENTILE.INC(C2:C200,0.9)
Rolling 7-day sum by date

Sum the last seven days of metric values anchored to the current row's date.

=IF(ROW(A2)<8,"",SUM(FILTER($C$2:C2,$A$2:A2>=A2-6)))
AVERAGEIF for qualified leads

Average a metric only when the related status meets your condition.

=AVERAGEIF(Leads!$B:$B,"Qualified",Leads!$D:$D)
Subtotal ignoring filtered rows

Use SUBTOTAL to respect filters and hidden rows for pivot-like summaries.

=SUBTOTAL(9,C2:C100)

Date & time operations

Start of ISO week

Align any date to the Monday of that week for grouping in reports.

=IF(A2="","",A2-WEEKDAY(A2,2)+1)
Today marker

Return today's date so dashboards can show "as of" context.

=TODAY()
Current timestamp

NOW updates whenever the sheet recalculates—useful for monitoring data freshness.

=NOW()
End of month snapshot

Return the final day of the month to anchor monthly close metrics.

=IF(A2="","",EOMONTH(A2,0))
Business days between dates

Count working days between two dates while excluding holidays.

=IF(OR(A2="",B2=""),"",NETWORKDAYS(A2,B2,Holidays!$A:$A))
Add hours to timestamp

Shift a timestamp by a number of hours—helpful for SLA deadlines.

=IF(OR(A2="",B2=""),"",A2+(B2/24))
Convert timestamp to ISO string

Format a datetime for APIs that expect ISO 8601 strings.

=IF(A2="","",TEXT(A2,"yyyy-mm-dd""T""hh:mm:ss"))
Next business review date

Jump ahead three working days, skipping weekends and holidays.

=IF(A2="","",WORKDAY(A2,3,Holidays!$A:$A))
Construct date from parts

Build a valid date from year, month, and day columns.

=DATE(A2,B2,C2)
Construct time from parts

Assemble hours, minutes, and seconds into a single time value.

=TIME(D2,E2,F2)
Days between dates

DATEDIF calculates elapsed days even when the start is before the end.

=IF(OR(A2="",B2=""),"",DATEDIF(A2,B2,"D"))

Text, array & automation

List unique values alphabetically

Combine UNIQUE and SORT to create quick picklists for data validation.

=SORT(UNIQUE(FILTER(A2:A,A2:A<>"")))
Comma-separated list

Turn a column into a comma-separated string for logs or API payloads.

=TEXTJOIN(", ",TRUE,FILTER(A2:A,A2:A<>""))
Dynamic sequence generator

Produce sequential IDs or counters without manual typing.

=SEQUENCE(ROW(A11)-ROW(A2)+1,1,1,1)
Split tags into columns

Break a delimited list into separate columns for additional analysis.

=IF(A2="","",SPLIT(A2,","))
Array lowercase

Apply lowercase to an entire column in one formula for consistent comparisons.

=ARRAYFORMULA(IF(A2:A="","",LOWER(A2:A)))
Extract first characters

Use LEFT to keep the first n characters of a string (after trimming).

=IF(A2="","",LEFT(TRIM(A2),5))
Extract last characters

Use RIGHT to grab trailing codes, such as the last four digits.

=IF(A2="","",RIGHT(TRIM(A2),4))
Extract middle characters

Use MID when you need a portion of a string from the middle.

=IF(A2="","",MID(A2,3,5))
Measure string length

LEN tells you how many characters appear in a cell after trimming.

=IF(A2="","",LEN(TRIM(A2)))
Concatenate labels

Combine multiple text fields into a single label with separators.

=CONCAT(A2," - ",B2)
Format number as currency text

Create a text representation of a number with a currency symbol.

=IF(C2="","",TEXT(C2,"$#,##0.00"))

Workflow helpers

Build webhook payload JSON

Create a small JSON payload to post into another system without leaving your sheet.

=TEXTJOIN("",TRUE,"{""account"": """,A2,""",""status"": """,B2,""",""total"": ",TEXT(C2,"0.00"),"}")
Generate idempotent run keys

Combine date and customer ID to produce a unique key for deduplication.

=IF(OR(A2="",B2=""),"",CONCAT(TEXT(A2,"yyyymmdd"),"-",B2))
Compose Slack alert

Create a multi-line Slack message with Markdown formatting from sheet values.

=TEXTJOIN(CHAR(10),TRUE,"*Alert*: "&A2,"Account: "&B2,"Owner: "&C2)
Build query string parameters

Compact record values into a URL-encoded parameter string for HTTP actions.

=SUBSTITUTE(TEXTJOIN("&",TRUE,"account="&A2,"status="&B2,"total="&TEXT(C2,"0.00"))," ","%20")
SQL IN clause builder

Wrap values in quotes and join them for an IN() clause inside workflow SQL nodes.

=TEXTJOIN(", ",TRUE,ARRAYFORMULA("""&FILTER(A2:A,A2:A<>"")&"""))

Error handling & observability

Guard required inputs

Ensure both inputs are present before passing control to downstream blocks.

=IF(OR(A2="",B2=""),"MISSING","READY")
Friendly divide-by-zero message

Replace calculation failures with a readable error string for dashboards.

=IFERROR(C2/D2,"ERR: divide by zero")
Outlier detector

Flag values that deviate more than two standard deviations from the mean.

=IF(C2="","",IF(ABS(C2-AVERAGE($C$2:$C$31))>2*STDEV.P($C$2:$C$31),"OUTLIER",""))
Timestamp workflow runs

Log the execution time of a workflow step in a human-readable format.

=TEXT(NOW(),"yyyy-mm-dd hh:mm:ss")

Share feedback

Docs are evolving alongside the product. Email support@actionor.io with requests or examples you would like to see.