In Excel, go to Formulas > Name Manager > New. Enter MKT_CPCV as the name, paste the full LAMBDA into Refers to, and save. Use =MKT_CPCV(A2,B2) for one row, =MKT_CPCV(A2:A20,B2:B20) for a traditional range, =MKT_CPCV(A2:.A600,B2:.B600) for trailing Trim References, =MKT_CPCV(A2#,B2#) for spilled ranges, and =MKT_CPCV(A2:.A600,B2:.B600,1) for numeric output.
Marketing
MKT_CPCV
Calculate CPCV in Excel
Calculate cost per completed view from spend and video completions in Excel.
=MKT_CPCV(SPEND, COMPLETIONS, [NUMERIC])What It Does
What this function calculates
MKT_CPCV calculates cost per completed view for video campaigns and reporting dashboards. It turns common video-performance inputs into a reusable function that works with direct values, ranges, Trim References, named ranges, and spilled arrays.
Syntax
Function syntax
=MKT_CPCV(SPEND, COMPLETIONS, [NUMERIC])Interactive Demo
Try MKT_CPCV
Edit the spend or completions below to see how MKT_CPCV recalculates the result.
Arguments
Inputs this function expects
| Argument | Required | Description | Example |
|---|---|---|---|
SPEND | Required | The spend for the video campaign, placement, creative, or row. Can be a direct numeric value, compatible numeric text, single-cell reference, traditional range, named range, trailing Trim Reference, or Microsoft 365 spilled range. | 600 |
COMPLETIONS | Required | The number of completed video views or completed plays. Can be a direct numeric value, compatible numeric text, single-cell reference, traditional range, named range, trailing Trim Reference, or Microsoft 365 spilled range. | 3200 |
NUMERIC | Optional | Optional. Leave blank for presentation-ready text output. Enter 1 to return a numeric value suitable for calculations. The formula checks whether NUMERIC is supplied with ISOMITTED(NUMERIC), not whether the value specifically equals 1. | 1 |
Example
Example calculation
Expected result$0.19
Spend divided by completed video views. Use numeric mode when CPCV needs to feed blended cost analysis, pacing, or optimization rules.
Sample Data
Copy/paste-ready sample data
Sample Campaign Data
Copy and paste this campaign dataset into Excel starting at A1, then test the function against the metric columns.
| Spend | Completions | Campaign |
|---|---|---|
| 250 | 800 | Search Brand |
| 420 | 2600 | Paid Social |
| 180 | 1400 | Display Prospecting |
| 600 | 3200 | Video Awareness |
| 90 | 0 | No Completion Check |
=MKT_CPCV(A2:.A600,B2:.B600)Expected outputWith the sample data pasted at A1, the formula spills formatted text results: $0.31, $0.16, $0.13, $0.19, and $90. Add ,1 for numeric CPCV values. The final row demonstrates zero-completion handling.
Supports direct values, numeric text, single cells, normal ranges, named ranges, trailing Trim References, and spilled ranges when spend and completion inputs align.
Result
What the output means
Returns CPCV as formatted dollar text by default, or a numeric cost when NUMERIC is supplied. Aligned ranges spill row by row. Zero completions are replaced with 1 before division, making no-completion rows visible for diagnosis.
Function Definition
LAMBDA definition
=LAMBDA(SPEND,COMPLETIONS,[NUMERIC],IF(ISOMITTED(NUMERIC),
"$"&ROUND(IFERROR(VALUE(SPEND),"")/IFERROR(VALUE(IF(COMPLETIONS=0,1,COMPLETIONS)),""),2),
ROUND(IFERROR(VALUE(SPEND),"")/IFERROR(VALUE(IF(COMPLETIONS=0,1,COMPLETIONS)),""),2)))Installation
Add this function to Excel
Troubleshooting
Common errors
#SPILL! means Excel cannot place the dynamic-array result; clear blocked cells below or beside the formula. #NAME? usually means the function was not saved in Name Manager or the name was typed differently. Numbers stored as text are generally handled with VALUE(), but non-numeric labels, extra symbols, or incompatible text can still return blanks or unexpected results. If ranges are mismatched, align the numerator and denominator ranges before using dynamic arrays. When the denominator is zero, this function substitutes 1 before division to avoid divide-by-zero errors; that can create unusually large or non-standard results and should be reviewed. Omit NUMERIC for formatted text output; enter 1 for numeric output. Because the formula uses ISOMITTED(NUMERIC), any supplied third argument triggers numeric mode.
Custom Function Request
Need a function that isn't here?
Tell me what you're trying to calculate.