Skip to content

Working in an Excel File in ChatGPT

In this section, we are using an Excel file. You can download it here: Cats.xlsx

Show transcript

Intro
Hi! In this video, we’ll go through how you can use ChatGPT to work with an Excel file. We’ll cover tasks such as displaying data directly in the chat, calculating specific information, and adding a new column.

Part 1 - Upload the file
On the screen, you can see the Excel document we’ll be working with. It’s a list of cats with information about each cat, such as names, owners, etc.
First, we upload the file:

  1. I click the button labeled "attach files" and select the option "upload from computer".
  2. I’m prompted to choose files from my computer. I select Cats.xlsx.
  3. Once the file is uploaded, I click the send button.
  4. ChatGPT displays a preview of the file’s contents as a table directly in the chat. It then describes how it interpreted and analyzed the different columns in the file.
  5. Now, we can start working with the file.

Part 2 - Count how many cats Alice has
If we want to know how many cats Alice has, I type:
Count how many cats Alice has.

ChatGPT scans the file and shows the result.

Part 3 - Display data in the chat view
To get a quick overview of the contents, we can ask ChatGPT to display the data. I type:
Show me the contents of the file.

The data is now displayed directly in the chat view.

Part 4 - Add a column for the cat’s age
We can also add a new column to the file. I type:
Add a column, Age, that calculates the cats age from its birth year

A new column with the age calculated from the birth year is added to the data.

Part 5 - Download the edited Excel file
We can ask ChatGPT to provide the updated Excel file.
I type:
Give me the updated Excel file.

A download link becomes available.
I download the file and open it to review the updates ChatGPT made.

Part 6 - Make the age column dynamic
We see that ChatGPT created a column named Age. However, the column isn’t dynamic and won’t update the age if the birth year changes.
We can ask ChatGPT to create an Excel formula that dynamically calculates the age instead of hardcoding the calculation in the cell. This requires us to be more specific in our instruction.
I type:
Change the Age column to be dynamic. It should be an Excel formula that calculates the age from today's date and the cell in the column labeled Birth Year (4th column)

ChatGPT generates an updated version of the Excel file and provides a new download link. I download the new file to verify that it works correctly.

Part 7 - Get information about the formula
We can ask ChatGPT to explain which formula it used to calculate the age.
I type:
Show me the formula you used

ChatGPT displays the formula along with an explanation of how it works.

Conclusion
That’s all for this walkthrough. We’ve gone over how to upload a file, display its content, perform a simple analysis, and add a calculation. Thank you for watching!