To get Indian stock prices in Excel, you can use Excel's built-in Stocks data type (delayed prices, manual refresh) or the MarketXLS India add-in, which returns NSE and BSE data through formulas such as =Last("TCS:IN") for the current price and =Close_Historical("TCS:IN", DATE(2024,1,25)) for a past close. For live, streaming NSE/BSE prices, MarketXLS India connects to your Zerodha or Angel One broker account. MarketXLS India is served from marketxls.in.
Try it in your own spreadsheet
Get the free MarketXLS sample workbook (.xlsx).
No account needed. MarketXLS live data requires a paid plan. Preview workbook
Explore more videos
This guide compares four methods (Excel Stocks data type, MarketXLS, Google Sheets GOOGLEFINANCE and Power Query), then shows the MarketXLS formulas for real-time prices, historical data, technical indicators, fundamentals and a portfolio tracker.
Table of Contents
- Why Track Indian Stock Prices in Excel?
- Method 1: Excel 365 Built-In Stocks Feature
- Method 2: MarketXLS Add-In for Excel
- Method 3: Google Sheets with GOOGLEFINANCE
- Method 4: Power Query Web Connection
- Methods Comparison Table
- Getting Real-Time Indian Stock Prices with MarketXLS
- Historical Indian Stock Data in Excel
- Technical Indicators for Indian Stocks
- Building an Indian Stock Market Tracker
- Fundamental Analysis for Indian Stocks
- Connecting to Indian Brokers
- NSE vs. BSE Data Availability
- Google Sheets for Indian Stocks
- FAQ
Why Track Indian Stock Prices in Excel?
Excel lets you combine live Indian market data with your own calculations, models and layout, which fixed trading apps do not allow:
Flexibility and Customization
- Build trackers tailored to your exact needs
- Add custom calculations, ratios, and indicators
- Create personalized dashboards and alerts
- No limitation on what you can track or calculate
Privacy and Control
- Your data stays on your machine
- No third-party app has access to your portfolio
- Full control over formulas, formatting, and structure
- Export and share on your terms
Integration with Analysis
- Combine stock data with your own research
- Build DCF models, ratio analysis, and screening tools
- Perform backtesting with historical data
- Create automated reports
Professional Standard
- Excel is the industry standard for financial analysis
- Skills are transferable across jobs and roles
- Widely used by Indian mutual fund managers, analysts, and traders
Method 1: Excel 365 Built-In Stocks Feature
If you have Microsoft 365, you can use the built-in Stocks data type:
How to Use It
- Type a stock ticker in a cell (e.g., "TCS" or "Reliance Industries")
- Select the cell(s) and go to Data tab → Stocks
- Excel recognizes the stock and creates a linked data type
- Click the icon to see available fields (price, market cap, P/E, etc.)
Limitations for Indian Stocks
| Limitation | Details |
|---|---|
| Delayed data | Prices are 15–20 minutes delayed |
| Manual refresh | Must click Refresh to update prices |
| Limited coverage | Not all NSE/BSE stocks are recognized |
| No streaming | Cannot auto-update without manual action |
| No options data | Only equity prices available |
| No historical formulas | Cannot pull specific historical dates |
| Requires internet | Must be connected to fetch data |
| Limited indicators | No technical indicators built in |
The Stocks data type works for basic monitoring, but it has no historical formulas, streaming or technical indicators.
Method 2: MarketXLS Add-In for Excel
MarketXLS India is an Excel add-in that returns Indian stock market data through worksheet formulas. It is sold separately from the US product, on marketxls.in.
What MarketXLS India provides
- Real-time streaming prices when you connect a Zerodha or Angel One broker account
- Formulas for price, fundamental and technical data
- NSE stocks, indices and options coverage
- Historical data accessible via formulas
- No VBA required: plain Excel formulas
Indian Stock Symbol Format
MarketXLS uses the :IN suffix for Indian stocks:
- TCS →
"TCS:IN" - Reliance →
"RELIANCE:IN" - HDFC Bank →
"HDFCBANK:IN" - Infosys →
"INFY:IN" - HDFC Life →
"HDFCLIFE:IN"
Method 3: Google Sheets with GOOGLEFINANCE
Google Sheets offers the GOOGLEFINANCE function for basic stock data:
How to Use
=GOOGLEFINANCE("NSE:TCS")
=GOOGLEFINANCE("NSE:RELIANCE", "price")
=GOOGLEFINANCE("NSE:INFY", "high")
Limitations
- Delayed data (15–20 minutes)
- Limited historical data access
- No technical indicators
- No options or derivatives data
- Cannot stream real-time prices
- Limited fundamental data
Note: MarketXLS also works with Google Sheets, so you can use MarketXLS formulas alongside GOOGLEFINANCE for more comprehensive data.
Method 4: Power Query Web Connection
Excel's Power Query can connect to financial data websites:
How It Works
- Go to Data → Get Data → From Web
- Enter a financial data URL
- Select the table you want to import
- Set up automatic refresh schedules
Limitations
- Requires manual URL configuration
- Websites may change format and break your queries
- No real-time streaming
- Depends on website availability
- May violate terms of service of some websites
Methods Comparison Table
| Feature | Excel 365 Stocks | MarketXLS | Google Sheets | Power Query |
|---|---|---|---|---|
| Cost | Included with 365 | ₹3,500/month (marketxls.in) | Free | Included with Excel |
| Real-Time Data | Delayed | Real-time streaming via Zerodha or Angel One | Delayed | Varies |
| NSE Coverage | Partial | Stocks, indices, options | Partial | Depends on source |
| BSE Coverage | Partial | Yes | Partial | Depends on source |
| Options Data | No | Yes | No | Limited |
| Historical Data | Limited | Formula-based | Limited | Manual |
| Technical Indicators | No | Formula-based (SMA, RSI, ATR and more) | No | No |
| Fundamental Data | Basic | P/E, dividends, revenue, EBITDA and more | Basic | Varies |
| Broker Integration | No | Zerodha, Angelone | No | No |
| Auto Refresh | Manual | Automatic streaming (broker connected) | Manual | Scheduled |
| Setup Difficulty | Easy | Easy | Easy | Moderate |
| VBA Required | No | No | N/A | No |
Getting Real-Time Indian Stock Prices with MarketXLS
Basic Price Retrieval
Get the latest price for any Indian stock:
=Last("TCS:IN")
Formula documentation: Last
For real-time streaming prices that update automatically:
=Stream_Last("TCS:IN")
Formula documentation: Stream_Last
QuoteMedia Price Functions
=QM_Last("TCS:IN")
=QM_Stream_Last("TCS:IN")
Formula documentation: QM_Last, QM_Stream_Last
Multiple Stocks at Once
Set up a column of tickers and use formulas down the column:
| A (Ticker) | B (Price) | C (Change) |
|---|---|---|
| TCS:IN | =Last("TCS:IN") | Formula |
| RELIANCE:IN | =Last("RELIANCE:IN") | Formula |
| HDFCBANK:IN | =Last("HDFCBANK:IN") | Formula |
| INFY:IN | =Last("INFY:IN") | Formula |
| ICICIBANK:IN | =Last("ICICIBANK:IN") | Formula |
Broker Integration for True Real-Time
MarketXLS India gets live streaming data through your broker connection:
- Zerodha: Connect your Zerodha account for real-time NSE/BSE prices
- Angelone: Integrate with Angel One for live data streaming
Once connected, =Stream_Last() provides truly real-time prices without the typical 15-minute delay.
Historical Indian Stock Data in Excel
Getting Historical Prices
Use the =Close_Historical() function for specific date prices:
=Close_Historical("TCS:IN", DATE(2024,1,25))
Formula documentation: Close_Historical
This returns TCS's closing price on January 25, 2024.
Historical Data Tables
For a range of historical data:
=GetHistory("TCS:IN", "2024-01-01", "2024-12-31", "d")
Formula documentation: GetHistory
This returns a full table of daily prices (open, high, low, close, volume) for TCS throughout 2024.
Adjusted Historical Prices
For prices adjusted for splits and dividends:
=Adjusted_Close_Historical("TCS:IN", DATE(2024,1,25))
Formula documentation: Adjusted_Close_Historical
Historical Data Use Cases
- Backtesting strategies: Test trading rules on historical data
- Performance comparison: Compare stocks over specific periods
- Volatility analysis: Calculate historical volatility
- Chart creation: Build custom charts from historical data
- Return calculation: Compute returns over any time period
Technical Indicators for Indian Stocks
MarketXLS provides technical indicators directly as Excel formulas:
Moving Averages
=SimpleMovingAverage("TCS:IN", 20) // 20-day SMA
=SimpleMovingAverage("TCS:IN", 50) // 50-day SMA
=SimpleMovingAverage("TCS:IN", 200) // 200-day SMA
Formula documentation: SimpleMovingAverage
Relative Strength Index (RSI)
=RSI("TCS:IN")
Formula documentation: RSI
Average True Range (ATR)
=AverageTrueRange("TCS:IN", 14)
Formula documentation: AverageTrueRange
Building a Technical Dashboard
| Stock | Price | RSI | SMA(20) | SMA(50) | ATR(14) |
|---|---|---|---|---|---|
| TCS:IN | =Last("TCS:IN") | =RSI("TCS:IN") | =SimpleMovingAverage("TCS:IN",20) | =SimpleMovingAverage("TCS:IN",50) | =AverageTrueRange("TCS:IN",14) |
Repeat for each stock in your watchlist. Add conditional formatting to highlight:
- RSI above 70 (potentially overbought) in red
- RSI below 30 (potentially oversold) in green
- Price above SMA(200) in green (uptrend)
- Price below SMA(200) in red (downtrend)
Building an Indian Stock Market Tracker
Here's a complete tracker template using MarketXLS:
Portfolio Tracker Layout
| Column | Header | Formula (Row 2) |
|---|---|---|
| A | Stock | TCS:IN |
| B | Shares | 100 (manual) |
| C | Avg Cost (₹) | 3500 (manual) |
| D | Current Price | =Last("TCS:IN") |
| E | Day High | Use available price functions |
| F | Day Low | Use available price functions |
| G | Market Value | =B2*D2 |
| H | Cost Basis | =B2*C2 |
| I | P&L (₹) | =G2-H2 |
| J | P&L (%) | =(D2-C2)/C2 |
| K | SMA(20) | =SimpleMovingAverage(A2, 20) |
| L | RSI | =RSI(A2) |
Dashboard Summary Section
Below your holdings, add:
- Total Portfolio Value:
=SUM(G2:G20) - Total Cost:
=SUM(H2:H20) - Total P&L:
=SUM(I2:I20) - Overall Return:
=Total P&L / Total Cost - Number of Holdings:
=COUNTA(A2:A20)
Adding Sector Allocation
Create a separate section or sheet tracking sector weights:
- IT Services: TCS, INFY, WIPRO
- Banking: HDFCBANK, ICICIBANK, SBIN
- Energy: RELIANCE, ONGC
- Pharma: SUNPHARMA, DRREDDY
Use pie charts to visualize allocation and identify concentration risks.
Fundamental Analysis for Indian Stocks
MarketXLS provides fundamental data for Indian stocks:
Key Fundamental Metrics
=PERatio("TCS:IN") // Price-to-Earnings ratio
=DividendYield("TCS:IN") // Annual dividend yield
=DividendPerShare("TCS:IN") // Dividend per share
=MarketCapitalization("TCS:IN") // Market capitalization
=Revenue("TCS:IN") // Annual revenue
=EBITDA("TCS:IN") // EBITDA
Formula documentation: PERatio, DividendYield, DividendPerShare, MarketCapitalization, Revenue, EBITDA
Building a Fundamental Screener
| Stock | P/E | Div Yield | Market Cap | Revenue |
|---|---|---|---|---|
| TCS:IN | =PERatio("TCS:IN") | =DividendYield("TCS:IN") | =MarketCapitalization("TCS:IN") | =Revenue("TCS:IN") |
| INFY:IN | =PERatio("INFY:IN") | =DividendYield("INFY:IN") | =MarketCapitalization("INFY:IN") | =Revenue("INFY:IN") |
Add conditional formatting to highlight stocks that meet your criteria (e.g., P/E below 25, dividend yield above 1%).
Connecting to Indian Brokers
Zerodha Integration
MarketXLS India connects with Zerodha through the Zerodha API, allowing:
- Real-time streaming prices for NSE/BSE stocks
- Automatic price updates in your spreadsheet
- Use
=Stream_Last()for live data
Angelone Integration
Similarly, Angel One (Angelone) integration provides:
- Live market data streaming
- Real-time portfolio valuation
- Automatic updates without manual refresh
Why Broker Integration Matters
Broker-connected MarketXLS India streams prices continuously during market hours, while Excel's built-in Stocks feature provides delayed data that needs a manual refresh. Streaming matters for:
- Active traders who need real-time decision-making data
- Portfolio monitoring during volatile markets
- Setting up real-time alerts and triggers
NSE vs. BSE Data Availability
Understanding Indian Exchange Data
| Feature | NSE (National Stock Exchange) | BSE (Bombay Stock Exchange) |
|---|---|---|
| Number of Listed Companies | ~2,200 | ~5,500 |
| Market Share (Volume) | ~93% of equity trading | ~7% of equity trading |
| Index | Nifty 50 | Sensex (BSE 30) |
| Derivatives | Extensive F&O segment | Limited derivatives |
| Symbol Format | TCS:IN | TCS:IN (same ticker) |
Which Exchange Data to Use?
- For most Indian stocks, NSE data is preferred due to higher liquidity
- BSE may have data for smaller companies not listed on NSE
- MarketXLS India covers NSE stocks, indices and options
- Use
:INsuffix for all Indian stock symbols in MarketXLS
Indian Indices in MarketXLS
Track major Indian indices:
- Nifty 50
- Sensex
- Nifty Bank
- Nifty IT
Google Sheets for Indian Stocks
If you prefer Google Sheets, you have two options:
Option 1: GOOGLEFINANCE Function
=GOOGLEFINANCE("NSE:TCS") // Current price
=GOOGLEFINANCE("NSE:TCS", "high") // Day high
=GOOGLEFINANCE("NSE:TCS", "low") // Day low
=GOOGLEFINANCE("NSE:TCS", "volume") // Volume
=GOOGLEFINANCE("NSE:TCS", "marketcap") // Market cap
For historical data:
=GOOGLEFINANCE("NSE:TCS", "close", "1/1/2024", "12/31/2024", "DAILY")
Option 2: MarketXLS Google Sheets Add-In
MarketXLS also offers a Google Sheets add-on with the same style of formulas:
=Last("TCS:IN")
=PERatio("TCS:IN")
=RSI("TCS:IN")
Formula documentation: Last, PERatio, RSI
This lets you keep a Google Sheets workflow while using MarketXLS data.
Google Sheets vs. Excel for Indian Stock Tracking
| Feature | Google Sheets | Excel + MarketXLS |
|---|---|---|
| Cost | Free | ₹3,500/month (marketxls.in) |
| Accessibility | Browser, any device | Excel desktop |
| Collaboration | Built-in sharing | Manual sharing |
| Real-Time Data | Delayed | Real-time streaming (broker connected) |
| Functions | GOOGLEFINANCE + MarketXLS | MarketXLS function library |
| Technical Indicators | Limited | SMA, RSI, ATR and more |
| Broker Integration | No | Zerodha, Angelone |
Frequently Asked Questions
How do I get real-time Indian stock prices in Excel?
Connect the MarketXLS India add-in to your Zerodha or Angel One broker account, then use a streaming formula such as =Stream_Last("TCS:IN"). Prices then stream into your Excel cells during market hours without a manual refresh.
Which Excel versions support Indian stock data?
Excel 365 has a built-in Stocks data type with limited Indian coverage. The MarketXLS India add-in adds NSE and BSE data to desktop Excel through formulas like =Last("TCS:IN"); check the MarketXLS India pricing page or contact support for the Excel versions supported.
Can I get historical NSE stock prices in Excel?
Yes, MarketXLS provides historical Indian stock data through formulas. Use =Close_Historical("TCS:IN", DATE(2024,1,25)) for a specific date's closing price, or =GetHistory("TCS:IN", "2024-01-01", "2024-12-31", "d") for a complete table of daily historical data including open, high, low, close, and volume.
Do I need VBA to get Indian stock prices in Excel?
No, you do not need VBA or any coding knowledge. MarketXLS provides simple Excel formulas that work like any other function. Type =Last("TCS:IN") in a cell and press Enter; MarketXLS handles the data retrieval.
How do I track both NSE and BSE stocks in the same Excel sheet?
NSE and BSE stocks use the same MarketXLS symbol format. Use the :IN suffix for all Indian stocks (e.g., =Last("TCS:IN")). MarketXLS primarily sources data from NSE for most stocks. For the majority of actively traded Indian stocks, NSE data is preferred due to higher liquidity and tighter spreads.
Can I get Indian stock data in Google Sheets?
Yes, you can get Indian stock prices in Google Sheets using either the built-in GOOGLEFINANCE function (=GOOGLEFINANCE("NSE:TCS")) or the MarketXLS Google Sheets add-in. The GOOGLEFINANCE function provides basic delayed data, while MarketXLS offers more comprehensive data including technical indicators, fundamental metrics, and historical analysis.
Summary
Excel 365's built-in Stocks feature gives basic delayed Indian prices. The MarketXLS India add-in adds historical data, technical indicators and fundamentals through formulas, plus real-time streaming prices when connected to Zerodha or Angel One.
Key MarketXLS formulas for Indian stocks:
=Last("TCS:IN"): current price=Stream_Last("TCS:IN"): real-time streaming price (broker connected)=Close_Historical("TCS:IN", DATE(2024,1,25)): historical closing price=GetHistory("TCS:IN", startDate, endDate, "d"): historical data table=SimpleMovingAverage("TCS:IN", 50): 50-day moving average=RSI("TCS:IN"): Relative Strength Index=PERatio("TCS:IN"): price-to-earnings ratio
Ready to build your Indian stock market tracker? See MarketXLS India plans →
Disclaimer: None of the content published on marketxls.com constitutes a recommendation that any particular security, portfolio of securities, transaction, or investment strategy is suitable for any specific person. The author is not offering any professional advice of any kind. The reader should consult a professional financial advisor to determine their suitability for any strategies discussed herein.
