Back to Twelve Data in Excel
SheetXAI logo
Twelve Data logo
Twelve Data · Excel Guide

Fill a Valuation Dashboard Excel With P/E, Price-to-Book, and 52-Week Range

2026-05-15
5 min read

The Scenario

You're a fund analyst running a quantitative valuation screen. Sixty stocks. Five metrics: P/E ratio, forward P/E, price-to-book, price-to-sales, and 52-week high/low. The portfolio manager wants the screen in the shared drive by Thursday so he can prioritize which names get deeper research next week.

You've run this screen before. It took a full day last time — not because the analysis is hard, but because pulling 300 data points (60 stocks times 5 metrics) manually is the kind of work that takes longer than you think it will every single time.

The bad version:

  1. Open Twelve Data's key statistics endpoint, pull the first ticker's P/E, forward P/E, P/B, P/S, and 52-week range, and paste five values into the correct columns of the Excel workbook.
  2. Repeat for 59 more tickers. Some don't have forward P/E because analyst coverage is thin. Decide whether to write N/A or leave the cell blank — and make that decision inconsistently across the 60 rows.
  3. Finish with a workbook that has a mix of blank and N/A cells for missing data, which makes it impossible to sort the screen by any metric without the blanks and N/As landing in unexpected positions.

You run the screen to find the cheap stocks. You can't find them if you can't sort the output.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook. It reads the 60 tickers in column A and, through its built-in Twelve Data integration, fetches key statistics for each and writes them into a consistently formatted table.

Fetch key statistics from Twelve Data for each ticker in column A. Write P/E ratio (TTM) into column B, forward P/E into column C, price-to-book into column D, price-to-sales into column E, and market cap in millions into column F. Write N/A explicitly for any metric not available rather than leaving the cell blank.

What You Get

  • Columns B through F populated for all 60 tickers.
  • N/A written explicitly for unavailable metrics — no ambiguous blanks.
  • All ratios drawn from the same Twelve Data endpoint parameters, ensuring consistent methodology.

What If the Data Is Not Quite Ready

If you want 52-week high and low alongside the valuation metrics

Fetch key statistics from Twelve Data for each ticker in column A. Write P/E into column B, P/B into column C, P/S into column D, 52-week high into column E, 52-week low into column F. Fetch current price from Twelve Data and calculate distance from 52-week high as a percentage, writing into column G.

If you want to pre-filter the screen to stocks meeting specific valuation thresholds

Fetch key statistics from Twelve Data for each ticker in column A and write P/E, forward P/E, P/B, and P/S into columns B through E. In column F, write PASSES if P/E is between 5 and 20 and P/B is below 3, otherwise FAILS. Sort so PASSES rows appear first.

If some tickers are international with different accounting standards

Fetch key statistics from Twelve Data for each ticker in column A. Write country in column B and P/E, P/B, and P/S into columns C, D, E. Flag tickers from IFRS-reporting countries with IFRS in column F so the PM knows which ratios are not directly comparable to US GAAP names.

Kill-chain: fetch valuation metrics, score each stock, and deliver a ranked workbook

Fetch P/E (TTM), forward P/E, P/B, P/S, and market cap from Twelve Data for each ticker in column A. Write into columns B through F. Build a composite score in column G: award 1 point each for P/E below the group median, P/B below the group median, P/S below the group median, and forward P/E below TTM P/E (earnings acceleration signal). Scores range 0 to 4. Sort from highest to lowest score. Highlight the top 15 rows in green.

Try It

Get the 7-day free trial of SheetXAI and open your valuation screen workbook with 60 tickers in column A, then ask it to populate all five metrics and deliver a ranked output before Thursday. Also see enriching a stock list with company metadata and the full Twelve Data overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more