Can ChatGPT Use Excel?

Excel and ChatGPT: A Powerful Combination for Data Analysis

Can ChatGPT Use Excel?

Last Updated on

ChatGPT is a multifaceted AI chatbot that excels in automating various tasks, from generating content and writing codes to answering inquiries. Meanwhile, Microsoft Excel is a powerful office tool that enables users to structure, format, and compute data on a spreadsheet. 

By leveraging the ChatGPT API, users can seamlessly integrate the chatbot with Excel, unlocking many benefits such as streamlined data retrieval, efficient organization, responsive editing, and more. 

Here’s how you can do that.

Essential AI Tools

Editor's pick
EXCLUSIVE DEAL 10,000 free bonus credits

Jasper AI

On-brand AI content wherever you create. 100,000+ customers creating real content with Jasper. One AI tool, all the best models.
Editor's pick
Only $0.01 per 100 words

Originality AI detector

Originality.AI Is The Most Accurate AI Detection.Across a testing data set of 1200 data samples it achieved an accuracy of 96% while its closest competitor achieved only 35%. Useful Chrome extension. Detects across emails, Google Docs, and websites.
Editor's pick

Experience the full power of an AI content generator that delivers premium results in seconds. 8 million users enjoy writing blogs 10x faster, effortlessly creating higher converting social media posts or writing more engaging emails. Sign up for a free trial.
Editor's pick
Recommended SEO Content tool

Surfer AI

The best tool for SEO AI content. No. 1 SEO tool. Starts at $29/month
*Prices are subject to change. PC Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Learn more

Setting ChatGPT Up in MS Excel

Can ChatGPT Use Excel?

To set up ChatGPT on Microsoft Excel, follow these steps:



Acquiring your API key

  • Access the ChatGPT API Key homepage through the provided link.
  • Log in or create a new account using your email address.
  • Click the “Personal” option in the top-right corner.
  • Choose “View API Key” and generate your key by selecting “Create new secret key.”



Opening your Excel workbook

  • Select the “Developer” option in the top section of the workbook.
  • Click “Record Macro” under the “Store Macro” option.
  • In the drop-down field, choose “Personal Macro Workbook.”
  • You can now stop recording.



Adding VBN

  • First, open the Visual Basic Editor, which can be found in the left corner, and select the “personal.xlsb” section
  • Once the section is open, go to “model” and click on “Module 1”
  • Now, you need to add the VBA Code you can obtain by visiting the link. Copy the code and paste it into Module 1
  • In the VBA Code, you will find the “API KEY” section at the top, which you must replace with the “API Key code” you generated earlier.



Adding Macros to the toolbar

  • To assign the macro to the Quick Access toolbar, click the arrow key in the top-left corner of Excel.
  • Then, select “More Commands” and choose the macro option from the new window.
  • Add the Personal workbook to your Quick Access Bar by selecting <Separator>.
  • Additionally, you can customize the button icon to make it easily identifiable.
  • Finally, click “Ok” to complete the process.



Saving VBA Code into Excel

  • When you close the workbook, a pop-up window will appear to ensure that the VBA code is saved for Excel files. 
  • Click on “Save” to confirm. Next, open a new spreadsheet in Excel and input your prompt into a cell. 
  • After selecting that cell, run the VBA code from the Quick Access toolbar. 
  • The response from the AI Chatbot ChatGPT will then appear in a new worksheet.


By integrating ChatGPT into Microsoft Excel, users can streamline their workflow and effortlessly generate data and information without the hassle of constantly switching between different tabs.

Users need to obtain an API Key and VBA code to enable integration. Following the step-by-step guide above, users can seamlessly integrate ChatGPT with Microsoft Excel and enjoy its benefits.