Back to Twelve Data in Google Sheets
SheetXAI logo
Twelve Data logo
Twelve Data · Google Sheets Guide

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

2026-05-15
5 min read

The Scenario

You're a fund analyst. You're building a quantitative valuation screen for 60 stocks — P/E ratio, forward P/E, price-to-book, price-to-sales, and 52-week high/low. The screen is due to the portfolio manager by end of week so he can decide which names deserve deeper research. The 60 tickers are in column A. Everything else is blank.

You've done this manually before. It took a full day. You don't have a full day — you have a model to update in parallel and a Tuesday investor call to prep for.

The bad version:

  1. Open Twelve Data's API explorer, pull the key statistics endpoint for the first ticker, extract the five fields you need, and paste them into the sheet.
  2. Repeat for 59 more tickers. Some tickers have missing forward P/E data because sell-side coverage is thin — you have to decide per-ticker whether to write N/A or leave the cell blank.
  3. Notice that you have a mix of P/E ratios calculated on different bases (trailing twelve months vs. fiscal year last reported) and spend 30 minutes trying to figure out which tickers are which before deciding it's close enough.

The screen goes out with a footnote that says "data sourced from multiple endpoints, potential methodology inconsistency." The portfolio manager asks why.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Google Sheet. It reads the 60 tickers in column A and, through its built-in Twelve Data integration, fetches key statistics for each ticker and writes them into a consistent, named-column layout.

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. Where a metric is not available, write N/A explicitly.

What You Get

  • Columns B through F populated for all 60 tickers with TTM P/E, forward P/E, P/B, P/S, and market cap.
  • N/A written explicitly wherever Twelve Data does not return a value, so you can distinguish "no estimate available" from "the pull failed."
  • A consistent methodology across all 60 rows — all ratios drawn from the same Twelve Data endpoint parameters.

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 ratio into column B, price-to-book into column C, price-to-sales into column D, 52-week high into column E, and 52-week low into column F. In column G, calculate how far the current price (fetched from Twelve Data) is from the 52-week high as a percentage and write the result.

If you want to filter the screen to only stocks below a specific P/E threshold

Fetch key statistics from Twelve Data for each ticker in column A and write P/E ratio into column B, forward P/E into column C, price-to-book into column D, price-to-sales into column E. In column F, write PASSES SCREEN if P/E is between 5 and 20 and price-to-book is below 3, otherwise write FAILS SCREEN.

If some of your 60 tickers are non-US and may use different accounting standards affecting valuation comparability

Fetch key statistics from Twelve Data for each ticker in column A. Write sector into column B and country into column C. Write P/E, P/B, and P/S into columns D, E, and F. In column G, flag tickers from countries using IFRS accounting standards with IFRS so the portfolio manager knows which ratios may not be directly comparable to the US GAAP names in the same screen.

Kill-chain: fetch valuation metrics, score each stock, and rank the screen

Fetch P/E ratio (TTM), forward P/E, price-to-book, price-to-sales, and market cap from Twelve Data for each ticker in column A. Write into columns B through F. Build a composite valuation score in column G: score each metric relative to the median of the 60-stock universe (below median P/E gets 1 point, below median P/B gets 1 point, below median P/S gets 1 point, forward P/E below TTM P/E gets 1 point for earnings acceleration). Total score ranges from 0 to 4. Sort the sheet from highest to lowest score and highlight the top 15 in green.

Try It

Get the 7-day free trial of SheetXAI and open your valuation screen with 60 tickers in column A, then ask it to populate all five metrics and rank the results before the portfolio manager's review. 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