STOCKHISTORY function in Excel does not show all the tickers in Hong Kong Exchanges (XHKG)

Joshua Chung 1 Reputation point
2025-11-27T03:51:13.76+00:00

STOCKHISTORY does not return some tickers result. For example,

XHKG:3042 => No Good
XHKG:3046 => NG
XHKG:3476 =>NG

However, some other work flawlessly:

XHKG:5 => OK
XHKG:2800 => OK
XHKG:388 => OK

Please fix that.

Microsoft 365 and Office | Excel | For business | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-27T03:51:23.6233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The issue you are experiencing with the STOCKHISTORY function in Excel not returning results for certain tickers on the Hong Kong Exchanges (XHKG) could be due to several factors. Here are some possibilities:

    1. Ticker Availability: Not all tickers may be available for historical data retrieval through the STOCKHISTORY function. It's possible that the specific tickers you mentioned (XHKG:3042, XHKG:3046, XHKG:3476) do not have historical data accessible through the function.
    2. Data Source Limitations: The data source that Excel uses for the STOCKHISTORY function may not support all tickers on the Hong Kong Exchanges. Some tickers may not be included in the dataset.
    3. Function Limitations: The STOCKHISTORY function may have limitations regarding the types of securities it can retrieve data for, particularly for certain exchanges or less common tickers.

    To troubleshoot this issue, you can:

    • Verify the availability of the tickers on the exchange.
    • Check for any updates or changes in Excel that may affect the STOCKHISTORY function.
    • Consider using alternative methods or data sources to retrieve historical stock data for the tickers that are not working.

    If the problem persists, you may want to reach out to Microsoft support for further assistance regarding the functionality of the STOCKHISTORY function with specific tickers.


    References:

    0 comments No comments

  2. Darren-Ng 5,880 Reputation points Microsoft External Staff Moderator
    2025-11-27T05:00:44.5933333+00:00

    Dear @Joshua Chung,

    Thank you for posting your question in the Microsoft Q&A forum.

    Based on your description, some Hong Kong (XHKG) tickers aren’t returning results with STOCKHISTORY. To help us diagnose this, could you please share the exact formula(s) you used (including dates, interval, and properties) and confirm whether you tried qualifying the exchange (e.g., "XHKG:700")?

    What I tested with your “not good” tickers (3042, 3046, 3476) Please try these minimal, known-good patterns to isolate the issue. Replace the dates as needed.

    =STOCKHISTORY("XHKG:3046", DATE(2023,1,1), TODAY(), 2, 0, 0,1)
    
    
    

    and it worked, but we do not know whether it meet your expectation or not. it would be helpful if you could provide more detail information so we could support you more effective.

    User's image

    or you can try these formula (Replace the dates as needed.)

    =STOCKHISTORY("XHKG:3042", DATE(2024,1,1), DATE(2024,12,31), 0, 1)    // daily, with headers
    =STOCKHISTORY("XHKG:3046", DATE(2023,1,1), DATE(2023,12,31), 2, 0, 0,1) // monthly, no headers, Date+Close
    =STOCKHISTORY("XHKG:3476", DATE(2022,1,1), DATE(2025,11,1), 1, 1, 0,1,5) // weekly, headers, Date+Close 
    

    Looking forward to your update. I hope information above helpful. Feel free to reach out if you have any other questions.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.