What I Learned: How I made an idea generating “app” in 15 minutes using AI
How I created an idea generator using ChatGPT.
Hi everyone,
Over the past few months, I've been increasingly experimenting with several of Adobe's creative applications, particularly Illustrator. I began dabbling with it while designing the branding for Ritual, but recently, I decided to take it a step further by enrolling in a beginner's Udemy course (I'll share posts about that later). My intention was to have some fun creating brand kits for fictional businesses. These included elements like logos, colour palettes, packaging, etc. However, to achieve this, I also had to concoct brand briefs for each imagined business, leading me to an interesting concept.
What if I could utilize ChatGPT to create an idea-generating "app" in Excel?
With my laptop in hand, I launched ChatGPT and Excel and set out to realize this idea. To my amazement, it worked flawlessly!
In this blog post, I'll guide you step-by-step on how I accomplished this, share some general insights about the process, and hopefully inspire you to create your own tools. Let's dive in!
Prerequisites:To follow along, you'll need:
Microsoft Excel installed on your computer.
An OpenAI account. (Note: this exercise was performed in ChatGPT 3.5 and thus does not require a paid subscription to complete.)
Step 1: Setting up the Workbook
I began by creating a new Excel workbook and formed two worksheets. The first I labeled "Interface," and the second, "Bank." The "Interface" sheet will contain the interface and button to run the macro, while "Bank" will store all the idea prompts.
Step 2: Define the Prompt Bank
On the "Bank" sheet, I created three columns with the headers [Object or Service], [Adjectives], and [Techniques]. You could use whatever categories you want and theoretically have as many categories as you want. The cells in each row below the headers can be filled with as many individual items as you can come up with.
A handy tip is to ask ChatGPT to generate a list of 20 items for each category. Just make sure to start a new conversation when you move onto the next step.
I've populated my columns with about 30-35 items. See the screenshot below for an example.
Step 3: Set up the Interface
Next, move back to the interface tab where we will set up the interactive side of the generator. The key elements needed are a cell to input how many categories you want the script to consider and the cells where you want the idea prompts to appear.
I've configured it this way so that the user (myself) can select how restrictive I want the prompt to be. If I just want a product or service, I can enter "1". If I want a product or service and a mood associated with the brand, I can enter "2", and so on.
Here's what my page looks like. I've also used Excel's "Data Validation" feature to turn the options into a drop-down menu.
Step 4: Prompting ChatGPT for the Macro
Now comes the most demanding part. You need to describe your worksheet and instructions as clearly as possible. Here's the prompt I used:
“I am creating an excel workbook which uses a macro to generate prompts for design ideas. The workbook has two spreadsheets called "Interface" and "Bank". "Interface" is where the button to run the macro will be, "Bank" holds all the prompts. "Bank" has three columns with the headers [Object or Service], [Adjectives], [Techniques] in row 1. From row 2 downwards are all of the prompts. Your task is to create a macro that will be run from a button in "interface". When the button is clicked the following will occur:
If cell G4 in "interface" is empty, nothing with happen
If cell G4 in "interface' is equal to 1, a random prompt from [Object or Service] will appear in cell G10.
If cell G4 in "interface' is equal to 2, a random prompt from [Object or Service] will appear in cell G10 and a random prompt from [Adjectives] will appear in cell G11.
If cell G4 in "interface' is equal to 3, a random prompt from [Object or Service] will appear in cell G10, a random prompt from [Adjectives] will appear in cell G11, and a random prompt from [Techniques] will appear in cell G12.”
Incredibly, ChatGPT knew exactly what to do. Almost instantly it spat out the code below in excel VBA format and even provided the following instructions in how to add it into excel and use it. I followed the instructions and viola I had my generator.
To use this macro, follow these steps:
Open your workbook in Excel.
Press
Alt
+F11
to open the VBA Editor.Insert a new module by clicking
Insert
->Module
.Copy and paste the above macro into the module.
Close the VBA Editor.
Go back to your worksheet, select the "Interface" sheet, and add a button.
Right-click the button and choose "Assign Macro."
Select the "GeneratePrompts" macro from the list and click "OK."
Sub GeneratePrompts()
' Declare variables
Dim interfaceSheet As Worksheet
Dim bankSheet As Worksheet
Dim numPrompts As Integer
Dim randomRow As Integer
' Set the worksheets
Set interfaceSheet = ThisWorkbook.Worksheets("Interface")
Set bankSheet = ThisWorkbook.Worksheets("Bank")
' Check the value of cell G4 in "Interface"
If interfaceSheet.Range("G4").Value = "" Then
Exit Sub ' Do nothing if G4 is empty
ElseIf interfaceSheet.Range("G4").Value = 1 Then
numPrompts = 1
ElseIf interfaceSheet.Range("G4").Value = 2 Then
numPrompts = 2
ElseIf interfaceSheet.Range("G4").Value = 3 Then
numPrompts = 3
Else
Exit Sub ' Do nothing if G4 has an invalid value
End If
' Generate random prompts and populate the cells in "Interface"
Randomize ' Initialize the random number generator
randomRow = WorksheetFunction.RandBetween(2, bankSheet.Cells(Rows.Count, 1).End(xlUp).Row)
interfaceSheet.Range("G10").Value = bankSheet.Cells(randomRow, 1).Value
If numPrompts >= 2 Then
randomRow = WorksheetFunction.RandBetween(2, bankSheet.Cells(Rows.Count, 2).End(xlUp).Row)
interfaceSheet.Range("G11").Value = bankSheet.Cells(randomRow, 2).Value
End If
If numPrompts = 3 Then
randomRow = WorksheetFunction.RandBetween(2, bankSheet.Cells(Rows.Count, 3).End(xlUp).Row)
interfaceSheet.Range("G12").Value = bankSheet.Cells(randomRow, 3).Value
End If
End Sub
Step 6 (optional): Clearing the Generated Prompts
Then, I decided to go a step further and create another button to reset the page. This one was simpler, I just asked this:
“It works. Can you write me another macro that when clicked will clear cells G4, G10, G11, G12.”
From there I got another script and, again, instructions on how to implement it. I followed them, renamed my buttons, and I was done.
Sub ClearCells()
' Declare variables
Dim interfaceSheet As Worksheet
' Set the worksheet
Set interfaceSheet = ThisWorkbook.Worksheets("Interface")
' Clear the cells in "Interface"
interfaceSheet.Range("G4").ClearContents
interfaceSheet.Range("G10:G12").ClearContents
End Sub
Here’s a video of the finished product in action:
1×
Some Final Thoughts:
Admittedly, this is a rather simple application, but creating a small tool like this using Excel and AI was a truly eye-opening experience. The implications for saving time are significant. It not only expedited the coding process but also eliminated the need to even learn complex Excel VBA.
I think it's important to acknowledge the potential risks of blindly running AI-generated code without understanding its full implications. However, this experiment showcases the immense possibilities that AI, such as ChatGPT, offers. It challenges us to ponder the creative limits when leveraging even more advanced models like ChatGPT 4 and future releases.
Ultimately though, for the time being, this software empowers ordinary individuals, like myself, to quickly and effortlessly address daily challenges by using natural language to craft technological solutions. To me, that’s incredibly exciting.
If this post inspires you to create your own Excel-based tool, please share it with me! I'd love to see what you come up with.
As always, thank you for reading and have a fantastic day!