# Use Writr AI to generate Excel formulas

**Do you find it hard to remember all those Excel formulas? No worries, you can now use AI to generate Excel formulas. This article shows you how.**

A few weeks back, a former colleague told me I could use AI to generate Excel formulas. He thought it was awesome because he could never seem to remember all the different formulas to use.

Using natural language to explain what you would like the formula to do, then getting the formula, is pretty nifty.

## Generating the first formula

The first thing I tried was our own AI tool. I have never even thought of utilizing Writr.ai to generate Microsoft excel formulas. So I gave it a try.

A few seconds later, the AI responded with this formula:

```
=IF(A1>B1,1)
```

But trying to paste the formula creates an error in Microsoft Excel:

That's because the AI has used a comma instead of a semicolon. But these are the typical errors you would like not to happen on such a basic formula.

The correct formula, in this case, would be something like this:

```
=IF(A1>B1;1)
```

## But it works in Google Sheets.

I rarely use Microsoft Excel nowadays. I prefer to use Google Sheets because it is easy to collaborate with others and post data by API.

So pasting the original suggestion from Writr.ai works out of the box, as you can see from the example below:

Ok, cool. So let's use Google sheets, and give it a few more tries. Let's see how far we can push it :-)

Yes, this works on the first try. All is well and good, but this is probably so basic that most of you could create it without using an AI.

## Generate Intermediate Excel formulas with AI

It seems to handle generating simple or basic formulas pretty well. But what happens when we start throwing more complex problems at the AI? - will it be able to handle it?

Let's give it a try by trying to replicate an `XLOOKUP`

function.

`The ``XLOOKUP`

function returns the values in the result range based on the position where a match was found in the lookup range. If no match is found, it returns the closest match.

You'll see what we try to replicate by looking at the image below. First, it takes the value of `D2`

and compare it to the range `A2:A6`

, if it finds a corresponding price in the column `B`

it will be returned to the cell `E2`

.

So let's see how it handles these types of challenges :-)

These were the three first results it generated:

```
=IF(D2=apple,$1.99,IF(D2=orange,$0.99,IF(D2=banana,$0.79)))
```

```
=IF($D$2=$A1,B1,IF($D$2=$A2,B2,))
```

```
=IF(D2=$A$1,B1,IF(D2=$A$2,B2,IF(D2=$A$3,B3,... IF ( D 2 = $ A $ 6 , B6 )))
```

As you probably can see, this does not make any sense. It's complete and utter rubbish.

## Conclusion

While you can make basic Excel formulas with natural language tools like Writr.ai and similar tools, you will probably be better off using Google to find the formula you need.

Writr.ai is a writing assistant, not an Excel formula generator. While it's cool that it's able to produce basic formulas, I certainly won't need that type of assistance.

There are special AI tools that probably do a better job creating Excel formulas, Excelformulabot is one of them. I have not tried it, so I can't speak to the quality of the service, but they do have a free trial period if you want to give it a go.

One of the main challenges with generating Excel formulas with natural language is how specific you have to be when giving the AI instructions.

This is just an assumption, but most customers who want an AI to generate Excel formulas are having trouble articulating what they want the formula to do. And in those cases, even Google won't be able to help.

This was a fun experiment, even if I got the results I was expecting. I'll continue to use Writr.ai as it's intended - creating articles, blogs, and marketing material.