Track Prices & Dividends for Free. Forever.
Most dividend investors never need to pay
Free tier: 10,000 API calls/month • Your 20-stock portfolio uses ~3,000/month
Free tier includes:
Want more? Upgrade for full access (PE ratio, volume, market cap, etc.)
Try It Now
=DIVV("AAPL", "price") ' Current price
=DIVV_YIELD("MSFT") ' Dividend yield
=DIVVBULK(A1:A10, "price") ' Bulk prices
=DIVVDIVIDENDS("JNJ", 5) ' Last 5 dividends
=DIVVARISTOCRAT("PG") ' TRUE if 25+ yearsInstallation (5 minutes)
Open VBA Editor
In Excel, press Alt+F11 (Windows) or Option+F11 (Mac)
Import the Module
In VBA Editor: File → Import File... and select the downloaded DIVV.bas
Configure Your API Key
Run the setup wizard to configure your API key:
Option A: In VBA Editor, press Ctrl+G to open Immediate Window, then type:
DivvSetup
Option B: Or set the key directly:
SetDivvApiKey "sk_live_your_api_key_here"
Get your free API key from your dashboard
Save as Macro-Enabled
Save your workbook as .xlsm (Excel Macro-Enabled Workbook) to preserve the VBA code
Test the Function
In any cell, type:
=DIVV("AAPL", "price")Press Enter. You should see the current price of Apple stock!
Available Functions
Main Functions
=DIVV(symbol, attribute)
Get any stock attribute for a symbol
=DIVV("AAPL", "price") ' Current price
=DIVV("MSFT", "dividendYield") ' Yield as decimal
=DIVV("JNJ", "yearHigh") ' 52-week high
=DIVV("PG", "peRatio") ' P/E ratio=DIVVBULK(symbolRange, attribute)
Bulk fetch data for multiple symbols efficiently (up to 100)
=DIVVBULK(A1:A10, "price") ' Prices for 10 stocks =DIVVBULK(A1:A50, "dividendYield") ' Yields for 50 stocks
Requires paid plan
=DIVVDIVIDENDS(symbol, limit)
Get dividend payment history with ex-dates and amounts
=DIVVDIVIDENDS("AAPL", 10) ' Last 10 dividends
=DIVVDIVIDENDS("JNJ") ' Last 10 (default)
' Returns: [Ex-Date, Amount, Frequency]Requires paid plan
=DIVVARISTOCRAT(symbol, returnYears)
Check if a stock is a Dividend Aristocrat (25+ consecutive years of dividend increases)
=DIVVARISTOCRAT("JNJ") ' TRUE (is aristocrat)
=DIVVARISTOCRAT("AAPL") ' FALSE (not aristocrat)
=DIVVARISTOCRAT("PG", TRUE) ' 67 (years of increases)=DIVVHISTORY(symbol, attribute, startDate, endDate)
Get historical price data for charting and analysis
=DIVVHISTORY("AAPL", "close", "2024-01-01", "2024-12-31")
=DIVVHISTORY("MSFT", "volume", A1, B1) ' Excel dates work too
' Returns: [Date, Value] arrayRequires paid plan
Convenience Functions
Quick shortcuts for common data points - no need to remember attribute names!
| Function | Returns |
|---|---|
| DIVV_PRICE(sym) | Current price |
| DIVV_YIELD(sym) | Dividend yield |
| DIVV_ANNUAL(sym) | Annual dividend |
| DIVV_NAME(sym) | Company name |
| DIVV_SECTOR(sym) | Sector |
| DIVV_CHANGE(sym) | Price change ($) |
| DIVV_CHANGEPCT(sym) | Price change (%) |
| Function | Returns |
|---|---|
| DIVV_VOLUME(sym) | Trading volume |
| DIVV_HIGH(sym) | Day high |
| DIVV_LOW(sym) | Day low |
| DIVV_52HIGH(sym) | 52-week high |
| DIVV_52LOW(sym) | 52-week low |
| DIVV_PE(sym) | P/E ratio |
| DIVV_MARKETCAP(sym) | Market cap |
Dividend-specific functions:
| DIVV_NEXT_DATE(sym) | Next ex-dividend date |
| DIVV_FREQUENCY(sym) | Payment frequency (Quarterly, Monthly, etc.) |
Available Attributes
Use these with =DIVV(symbol, "attribute")
Price Data
- price
- open
- dayHigh / dayLow
- previousClose
- change / changePercent
- yearHigh / yearLow
Volume & Market
- volume
- avgVolume
- marketCap
- sharesOutstanding
- priceAvg50
- priceAvg200
Fundamentals
- dividendYield
- dividendAmount
- peRatio
- eps
- company
- sector / exchange
Settings Management
Setup Commands
| Command | Description |
|---|---|
| DivvSetup | Interactive setup wizard |
| SetDivvApiKey "key" | Set API key directly |
| GetDivvApiKey() | Get current API key |
| TestDivvConnection | Test API connectivity |
| ClearDivvCache | Clear cached data |
| DivvInfo | Show current settings |
Note: Your API key is stored in a hidden worksheet called _DivvSettings. The key is not visible to other users of the workbook unless they access VBA.
Caching & Performance
The VBA module includes a worksheet-based caching system to reduce API calls and improve performance.
How it works:
- 1. Data is cached in a hidden worksheet named
_DivvCache - 2. Cache expires after 5 minutes by default
- 3. Same symbol within 5 minutes = instant response (no API call)
- 4. DIVVBULK is more efficient than multiple DIVV calls
Clear Cache: To force fresh data, run this in VBA (Ctrl+G in VBA Editor):
ClearDivvCache
Compatibility
Supported Versions
- Excel 2010 and newer
- Excel for Windows
- Excel for Mac
- Microsoft 365
Limitations
- •Requires macros to be enabled
- •Not available in Excel Online (web version)
- •Mobile apps (iOS/Android) don't support VBA
Troubleshooting
#NO_API_KEY error
You need to configure your API key. Run DivvSetup in the VBA Immediate Window (Ctrl+G) or use SetDivvApiKey "your_key".
#VALUE! error
Macros may be disabled. Go to File → Options → Trust Center → Trust Center Settings → Macro Settings and enable macros.
#NAME? error
The VBA module may not be imported correctly. Check the VBA Editor (Alt+F11) to ensure the DivvAPI module is present.
#N/A error
The symbol may not exist or the API returned no data. Check the symbol spelling or try TestDivvConnection to verify API connectivity.
Rate limiting (slow responses)
The module includes automatic retry with exponential backoff for rate limits (HTTP 429). If you hit limits frequently, consider upgrading your plan or using DIVVBULK for multiple symbols.