How to Use ChatGPT to Create Excel Formulas

By:Thomas Harlander|
chatGPT/Excel
ChatGPT, the artificial intelligence (AI) chatbot developed by OpenAI, can assist as you work in programs like Excel and Google Sheets.Tada Images/Shutterstock

Ever sinceChatGPTlaunched for public use, its applications have ranged from debugging code tocheating on essaysto translating quotes from your favorite show into Shakespearean English (seriously, try it). But one of the most practical and underappreciated uses for the software is thegeneration of formulasfor use inExceland Google Sheets. Learn how you can use ChatGPT to become a veritable spreadsheet wizard.

Advertisement

What Exactly Is ChatGPT?

ChatGPT uses a machine learning algorithm that has been built on a vast amount of text data to generate human-like responses to natural language queries. In other words, ChatGPT is an artificial intelligence (AI) program that responds to your questions with easy-to-understand answers. ChatGPT can provide recommendations, generate text and even hold a conversation — and it's useful for applications like writing code or generating Excel formulas.

Advertisement

How to Use ChatGPT to Create Formulas in Excel and Google Sheets

When using ChatGPT to create spreadsheets, start simple and add complexity in steps. If, at any point, you feel lost, you can always ask the AI to rephrase or break down its explanation in more detail. Start by asking ChatGPT to show you an example of the type of table you want to create, and proceed to flesh out your spreadsheet with formulas from there.

Step 1. Ask ChatGPT to Show You a Template

假设您希望创建一个预算,但你没有't even know where to start. ChatGPT can help you by mocking up an example of the type of spreadsheet you want to create. For instance, you can ask ChatGPT to generate a sample household budget, like so:

Advertisement

ChatGPT/Excel budget
ChatGPT can help you to create a personal budget in Google Sheets.
ChatGPT

Use this template to create a basic budget in your own spreadsheet. Clear the contents of the "Total" row and "Difference" column — you'll use formulas to calculate those values automatically.

Step 2. Ask ChatGPT to Generate Formulas

At this point, the table created by ChatGPT doesn't contain any working formulas. In order to make it usable, you'll need to add the formula for calculating the values in the "Difference" column in your own spreadsheet. If you have your "Budget" in column B and your "Actual" in column C, you can askChatGPT to generate the formula for finding the difference between the two:

ChatGPT/Excel formula creation
ChatGPT can generate formulas for you when given the correct prompts.
ChatGPT

Additionally, you'll need the formula for calculating the sum of each column. ChatGPT can generate this for you:

ChatGPT/Excel formula creation
ChatGPT can generate useful formulas from the information you provide.
ChatGPT

Copy and paste this formula into column B row 10, below your budget for each category. This will calculate the sum of the entire column. Use a version of this same formula to calculate the sum of the values in columns C and D. Once you've done this, you'll have a rudimentary working budget.

Step 3. Ask ChatGPT to Explain How to Use Functions

Why stop at formulas? ChatGPT can help you add additional functionality to your spreadsheet. Let's say you want to highlight categories where your actual spending was over budget in red and categories where you met your budget (or were under budget) in green. You can ask ChatGPT to show you how to do that by asking a question like this:

ChatGPT/Excel functionality
ChatGPT can help you figure out exactly what you need Excel/Google Sheets to do for you to achieve a certain result.
ChatGPT

After all this, your resulting table in Google Sheets should look like so:

ChatGPT/Excel table creation
The ultimate result will be a table you can customize to fit your own parameters.
ChatGPT

As you progress, you can ask ChatGPT for increasingly sophisticated formulas to use within your sheet. Even if you don't know precisely what to ask for, the AI can guide you toward the formula you need if you ask enough clarifying questions.

Step 4. Ask Which Additional Features You Should Include

Lastly, you can even ask ChatGPT to recommend additional features for your budget:

ChatGPT/Excel recommendations
ChatGPT can even give you some ideas you may not have considered.
ChatGPT

If you want to know more about a specific formula and how to use it in your spreadsheet, simply ask ChatGPT to elaborate. You can use the basic steps outlined here to create excel formulas for a wide range of spreadsheets — everything from workout plans to depreciation schedules.

Advertisement

Tips for Using ChatGPT to Create Spreadsheets

Through the process of trial and error, you'll find that using ChatGPT to guide your creation of spreadsheets is intuitive and easy. If you're new to the software, keep the following best practices in mind:

  • Be precise.The more specific you can be in your query, the more likely it will be that ChatGPT provides you with an accurate answer. When asking ChatGPT to generate formulas, mention the exact cells you want it to incorporate into the formula. For example, you might ask the chatbot to "Create an Excel formula to average the values in cells B2 through B9."
  • Rephrase or edit your question.ChatGPT may misunderstand your question or provide an inaccurate result. If a formula generated by ChatGPT isn't working as intended, go back to the chatbot and ask it to create the formula again — but this time, try rephrasing your question. You can also edit a question you've already submitted by clicking the "edit" icon at the top right of your query in the ChatGPT interface.
  • Ask for an explanation.Another useful feature of ChatGPT is its ability to explain how a given Excel or Google Sheets formula works. If you've copied a spreadsheet from somewhere online and you want to understand how certain values are generated, you can ask ChatGPT to explain it for you. Copy the formula from the cell and paste it into ChatGPT, asking the AI to walk you through how the formula works.
  • Troubleshoot formulas that don't work.If you've written a formula on your own, and it doesn't seem to be working, you can copy and paste the formula into ChatGPT and ask the chatbot to explain what's wrong with it.

Advertisement

Advertisement

Loading...