How to Use AI to Structure an Unstructured Column in Excel

Image by Author

I used only 3 prompts to convert an unstructured data column in Excel to a structured column.

First prompt

Give me a function that will extract only email addresses from a cell and make sure it removes all the other text and special characters

Output: 

=TRIM(RIGHT(SUBSTITUTE(LEFT(A1, FIND(“ “, A1&” “, FIND(“@”, A1))-1), “ “, REPT(“ “, LEN(A1))), LEN(A1)))

This function resulted in <emily.jones@example.com>,

Second prompt

The function you provided is working but it also extracted special characters <, >, and , that are associated with the email value but I do not want these special characters so now create a formula that remove only these characters from <emily.jones@example.com>,

Output: 

=FILTERXML(“<t><b>” & SUBSTITUTE(B1, “<”, “”) & “</b></t>”, “//b”)

This function gave me emily.jones@example.com>,

Third prompt

The function you provided remove only < from <emily.jones@example.com>, but not > and ,(comma). So create a formula that removes > and , as well

Output: 

=FILTERXML(“<t><b>” & SUBSTITUTE(SUBSTITUTE(C1, “>”, “”), “,”, “”) & “</b></t>”, “//b”)

And finally, this resulted in emily.jones@example.com

How I used these outputs

1. There were 471 records so I inserted the first output in B1 and then dragged it up to the end.
2. Entered the second output in C1 then dragged it.
3. Entered the third output in D1 then dragged it.

I do use Excel but never created such complex functions and I have heard even for experts it is a time-consuming process.

So, even though I am not an Expert, I can create complex Excel functions.

What do you think about this use case?

Popular posts from this blog

Top 163 Mega Prompts for Marketing

What is Google Colaboratory? An Easy Explanation

Python vs. R for Data Science 2023: Demand Breakdown.

ChatGPT SEO Prompts