## CHATGPT IN EXCEL

In this step-by-step tutorial, learn how you can exponentially improve your Excel skills using OpenAI’s ChatGPT artificial intelligence. Write nested functions with ease, calculate the number of unique text values in a list, write a basic invoicing macro, and more, all with just a few clicks and a few basic refinements.

- CHATGPT IN EXCEL
- GET CHATGPT
- USE EXCEL FOR CHATGPT FOR SIMPLE SUM FUNCTION
- USE EXCEL FOR CHATGPT FOR PROFIT FUNCTION
- USE EXCEL FOR CHATGPT FOR LOOKUP FUNCTIONS
- USE EXCEL FOR CHATGPT FOR LEFT AND FIND NESTED FUNCTIONS
- USE EXCEL FOR CHATGPT FOR UNIQUE COUNT NESTED FUNCTIONS
- USE EXCEL FOR CHATGPT TO WRITE MACROS
- VIDEO STEPS
- RESOURCES

## GET CHATGPT

- Visit https://chat.openai.com/ and sign up for an OpenAI account.
- Setup an OpenAI account by clicking the “Sign Up” button.
- Select your email or Google or Microsoft account you want to log in with.
- Allow OpenAI to access your account
- Verify you are a human
- Verify your name, email address and phone number

- Then you will be able to use ChatGPT with the following landing page.

## USE EXCEL FOR CHATGPT FOR SIMPLE SUM FUNCTION

You can use ChatGPT to help find the function you’re looking for. In this case, you will be trying to find a function to add together the revenue across all markets- the Excel SUM function.

- Open an Excel workbook to follow along and open tab 1: Sum
- Open ChatGPT.
- Type an Excel question “Write an Excel formula to add up values in cells B2 to B10” and click Go.
- See the response from ChatGPT, in this case “=SUM(B2:B10)”
- Copy the function. Open Excel and paste in the ChatGPT response “=SUM(B2:B10)”
- Open ChatGPT again and ask “Can you explain how this function works?”
- ChatGPT will then respond with how the Excel Sum function works.

## USE EXCEL FOR CHATGPT FOR PROFIT FUNCTION

You can use ChatGPT to help find the function you’re looking for. In this case, you will be trying to find a function to compute the profit- the revenue minus the cost.

- Open an Excel workbook to follow along and open tab 2: Profit
- Open ChatGPT.
- Type an Excel question “Write an Excel formula to calculate the profit. The revenue is in cell A2 and the cost is in cell B2” and click Go.
- See the response from ChatGPT, in this case “=A2-B2”
- Copy the function. Open Excel and paste in the ChatGPT response “=A2-B2”
- You now have the profit.

## USE EXCEL FOR CHATGPT FOR LOOKUP FUNCTIONS

You can use ChatGPT to help find the function you’re looking for. In this case, you will be trying to find a function to do a vlookup .

- Open an Excel workbook to follow along and open tab 3: “Vlookup & Index Match”
- Open ChatGPT.
- Type an Excel question “Write an Excel formula to find Sugar Cookie in a table and return the price” and click Go.
- See the response from ChatGPT, in this case reference information for the vlookup function. It also provides a function “=VLOOKUP(“Sugar Cookie”, A1:Bn, 2, FALSE)” Copy the function.
- Copy the function. Open Excel and paste in the ChatGPT response “=VLOOKUP(“Sugar Cookie”, A1:Bn, 2, FALSE)”. Replace the n with the number of rows in the table, in this case 4 to select the entire table- “=VLOOKUP(“Sugar Cookie”, A1:Bn, 2, FALSE)”
- Hit Enter and see the correct response “3” that is the price of the Sugar Cookie.
- You can also ask ChatGPT if there is another way to answer this question by opening up ChatGPT and asking “Can I use any other functions”
- See the response that you can also use the Index and Match functions to do the same Sugar Cookie price lookup.

## USE EXCEL FOR CHATGPT FOR LEFT AND FIND NESTED FUNCTIONS

You can use ChatGPT to help find the function you’re looking for. In this case, you will be trying to find a function to get the name from an email address.

- Open an Excel workbook to follow along and open tab 4: “Left & Find”
- Open ChatGPT.
- Type an Excel question “Write an Excel formula to extract all the text before the @ character in cell A2” and click Go.
- See the response from ChatGPT, in this case “=LEFT(A2,FIND(“@”, A2)-1)”
- Copy the function.
- Open Excel and highlight the cells where you want the function to be used and press “CTRL-Enter” to paste in the ChatGPT function.
- You see the characters to the left of the @ symbol in the email address, in this case the name, in the column.

## USE EXCEL FOR CHATGPT FOR UNIQUE COUNT NESTED FUNCTIONS

You can use ChatGPT to help find the function you’re looking for. In this case, you will be trying to find a function to find the number of unique values in a list.

- Open an Excel workbook to follow along and open tab 5: “Unique Count”
- Open ChatGPT.
- Type an Excel question “Write an Excel formula to count the number of unique values in a list” and click Go.
- See the response from ChatGPT, in this case reference information for the vlookup function. It also provides a function “=SUM(1/COUNTIF(A1:A10, A1:A10))” Copy the function.
- Copy the function. Open Excel and paste in the ChatGPT response “=SUM(1/COUNTIF(A1:A10, A1:A10))”. Replace A1 with A2 since the value in A1 is the header name and doesn’t need to be included in the list of unique values.
- Hit Enter and see the correct response “7” that is the number of unique cookie types.

## USE EXCEL FOR CHATGPT TO WRITE MACROS

You can use ChatGPT to help write an Excel Macro.

- Open an Excel workbook to follow along and open tab 6: Macro
- Open ChatGPT.
- Type an Excel question “Write an Excel macro to send emails. Use the following subject “Kevin Cookie Company Invoice”. Use the following text: “You owe the Kevin Cookie Company X.”. Take the value X from column A. Send to the email address listed in column B.” and click Go.
- See the response from ChatGPT, in this case an Excel macro that will send the email based on the subject and body information.
- Click the copy code option.
- Open Excel
- Enable macros in excel, by:
- Right clicking the ribbon to and click the “Customize Ribbon” option on the dialog
- On the right hand side, select the Developer checkbox.
- Click OK.
- YOu will see the new Developer tab.

- Click the Developer tab
- Open Excel Visual Basic Editor by clicking the “Visual Basic” button on the far left hand side.
- Paste in the code from ChatGPT.
- The code all works perfectly, except you will need to update the “For each cell in Columns(“A”)” line to “For each cell in Columns(“B”)” as the lookup is in the Column B, not A as the code suggests.

- Save the macro and close the window
- On the developer tab, click the Macros button.
- you will now see the new macro “SendEmails” that you can run.
- Click Run and now it will send out the emails.

Great email, keep up all your hard work. Fan from the beginning, when still at Mike Row Soft, thought that was funny. Going to grow up just like you one day. Never to late at 60.

LikeLike