How to Write Complex Nested Functions with Free AI
by Evan Brooks••6 min read
People who are new to Excel or don't know much about computers find it very frustrating to write formulas. It can be hard to understand when you put together functions like XLOOKUP, IF, AND, or text formulas.
A lot of people try to remember formulas, but that takes a long time and is hard.
The good news is that you don't have to be an Excel expert or know how to use Excel Copilot anymore. You can write complicated Excel formulas for free by just saying what you want in plain English.
You can learn how to use AI to help you with Excel with this guide. You won't have to remember syntax; instead, you'll learn how to ask the right questions.
This guide has examples that show you how to do things.
The order you give the AI
The AI came up with the formula.
The result of using the formula
This works with both Microsoft Excel and Google Sheets.
Stop trying to remember how to do things and learn how to ask questions.
Many people who are new to Excel think they need to memorize a lot of functions to do well. There are clear rules of logic that Excel formulas follow.
AI can figure these patterns out very well, but only if you make it clear what you want it to do.
The main idea is simple:
You talk about the goal and the data.
The AI creates the formula.
Instead of saying:
What function should I use?
You should ask:
What do I want Excel to do with the data I give it?
Core Logic: Know what goes in and what comes out.
Every good prompt has three parts:
- Where can I get the information? (Which cells or columns)
- What kind of condition or logic should be used?
- What do you want to happen, and where should it happen?
A bad example of a prompt
Make a formula in Excel.
This doesn't help the AI at all.
A Good Example of a Prompt
Column A has the product IDs, and column B has the prices.
I put an ID for the product in column D.
I want column C to show the correct price.
This prompt makes the job very clear.
Practical Example One: Using XLOOKUP or VLOOKUP with Conditions
Finding and matching data is one of the most common things people do in Excel. A lot of people find it hard to pick between VLOOKUP, XLOOKUP, and INDEX and MATCH.
This is what AI does.
Prompt Template: Search for Multiple Conditions
The AI was told:
Column A shows the product's ID.
Column B has the price.
Column D has an ID in it.
In column C, write the price that matches.
AI made the formula =XLOOKUP(D2, A:A, B:B)
The outcome after applying the formula
Excel gives the right price back.
There are no errors.
You don't have to look for things by hand.
AI picks XLOOKUP because it works from left to right and doesn't break when the columns are moved around.
Second Real-Life Example: Nested conditions (IF / AND / OR)
Beginners also have trouble with conditional logic. It can be scary to look at nested IF statements.
They don't bother AI at all.
Example from the real world
You need to figure out how much commission to pay based on where and how much you sell.
Here are some rules:
- If you live in the North and sell more than 10,000, give back 10%.
- If not, give back 5%
Prompt for AI
Column A shows how much was sold.
Column B shows the area.
If sales are over 10,000 and the region is North, give back 10%.
If not, give 5% back.
The formula made by AI is =IF(AND(A2>10000, B2="North"), 0.1, 0.05)
What the Result Means
Excel checks both conditions by itself.
It's easy to read and understand the logic.
The formula works in both Excel and Google Sheets.
You don't need to know how AND() works on the inside. You only need to tell me how it works.
Practical Scenario Three: Cleaning Data with Text Functions
Cleaning up messy data is another common problem with Excel. AI is very good at changing words.
For example, getting a birthday from an ID number
Let's say this:
There are ID numbers in column A.
Characters 7 to 14 show the date of birth (YYYYMMDD).
Prompt for AI
There are ID numbers in Column A.
The birthday is between the seventh and fourteenth characters.
In column B, write down the birthday.
AI-Generated Formula: =MID(A2, 7, 8)
Result
Column B has clear birthday information.
You don't have to write anything by hand.
The formula works right away on large datasets.
AI picks the simplest function over ones that are more complicated on its own.
How to Use AI to Fix Common Excel Errors
Even with AI help, mistakes can still happen. In Excel, #VALUE! is one of the most common errors.
The best part is that you don't have to fix things on your own.
Let AI fix the problem for you.
Don't guess; instead, copy the error message and tell me what's going on.
For example, my formula gives me #VALUE!
Column A has both letters and numbers in it.
I only want the numbers.
Please fix the math.
AI Response
The AI will:
- Learn what causes the mistake
- Change the formula
- Make the fix simple to understand.
This turns mistakes into chances to learn instead of getting angry.
Why this is better than Excel Copilot
Some people want to know why they shouldn't just use Excel Copilot.
There are a number of reasons why this method works better:
- It works without having to pay for Copilot access.
- It works with Google Sheets.
- It doesn't just show you the results; it teaches you how to think.
- You are in charge of the prompt and know what will happen.
This makes it good for:
- Students
- People who work in offices
- People who own small businesses
- Anyone who is starting from scratch to learn Excel
In the end
Writing complicated Excel formulas doesn't have to be hard or stressful. Before, learning Excel meant memorizing functions, watching long tutorials, and still being confused when real data didn't work the way you thought it would.
Today, free AI tools change this process completely.
If you describe your problem in plain English, AI can write correct Excel or Google Sheets formulas, explain how they work, and help you fix them when something goes wrong.
When you make things clear:
- Where to look for your data
- The rules you want to follow
- What you think will happen
AI is like a patient Excel teacher who never gets bored. It helps with lookups, conditional logic, cleaning up data, and fixing mistakes, even when formulas are hard to understand or are nested.
You don't have to worry about syntax anymore; you can use your data to solve real problems. AI makes things faster, clearer, and more certain, whether you use Google Sheets or Microsoft Excel.
It's no longer about memorizing things in Excel.
It has to do with getting AI to understand you.
Author
Evan Brooks
Visual AI Tool Reviewer
Evan tests free AI image and video tools by using the same prompts on different platforms. He looks at the real visual quality, the limits of the free plan, and whether a tool can actually replace paid creative software in everyday life.
Related Posts

The Best Free AI Tools for Writing Down Meeting Notes in 2026
we now often meet online for work and school. we now use Zoom, Microsoft Teams, and Google Meet to talk to coworkers, have classes, do interviews, and make sales calls. These tools make it easier to talk to each other, but they also make it hard to l

Build a Free Second Brain: The Best Alternative to Notion AI
Notion has an issue as one of the closely used tricks to make a 2D Einstein. It is a stance where citizen share their prespectives, ideas, trade union movement, research, and personal knowledge. When Notion AI was introduced, a large number of drug u

Claude Pro vs ChatGPT 4.5 for Writing Which Is Better for Real Human Writing
AI writing tools changed how people wrote in 2026. AI is used to write long things like emails, blog posts, rejection letters, and messages that people in a company send to each other. This includes students, bloggers, marketers, and people who work