Using OpenAI’s ChatGPT to Create Complex Excel Logic
The fourth blog post in this series on how to use ChatGPT in commercial real estate. As real estate financial modeling professionals, we’re often tasked with creating complex logic in Excel. Depending on one’s Excel proficiency, that task used to take anywhere from a few minutes to a few days. In fact, I remember certain logic problems related to lease reimbursements that I spent several weeks to eventually crack!
That of course has changed with the advent of natural language models like ChatGPT. In this video, I share a recent situation where I needed to write complex logic for my Student Housing Acquisition Model. To do that, I turned to ChatGPT for help. Something that would have taken me several hours, took just a few minutes.
The output created from ChatGPT during a back-and-forth exercise to create Excel logic for a real estate financial model.
What is GPT, ChatGPT, and OpenAI?
Given that this is the fourth blog post in this series, I assume you’re well aware of what ChatGPT and natural language models are. I also assume you’re familiar with its creator, OpenAI and the significant advances in artificial intelligence that is currently underway.
Therefore, I won’t rehash in this post what GPT, ChatGPT, or OpenAI are. However, if these concepts are new (or you’re looking to learn more) you might check out our Using AI in Real Estate guide.
Creating Complex Excel Logic – Then and Now
Before GPT, the process of creating complex Excel logic was a manual process. The real estate professional would generally rely on Excel forums, knowledge learned from Excel courses, and feedback from other professionals to craft the logic.
This process was very manual, highly iterative, and could take hours, days, or even weeks to complete. And in many cases, real estate financial modeling professionals would hit a wall where they couldn’t figure out a problem and would move on.
With the new language models like ChatGPT, creating complex (or simple) Excel logic is greatly simplified.
Models like GPT-4 (OpenAI’s latest version of its popular natural language model) now act as the knowledge base and the feedback loop to help us create this type of logic. And while the process is largely the same (i.e. seek out possible solutions, ask questions, and iterative), there’s only one place now to turn and the response is immediate and highly knowledge.
In the following video, I show you a real-life use case.
I was updating my Student Housing Acquisition Model. I needed to create a complex data validation list based on a range of cells where 11 out of 12 were empty. Since most of the cells in that range were empty, simply calling that range into a data validation list would have created a non-user friendly list.
Therefore, I turned to ChatGPT to figure out how to create a list that only pulled out the non-blank cells and then put the list in order from smallest to largest. If I could do that, I could then simply call that range into a data validation list and voila!
As you watch the video, I think what you’ll find most interesting is that a) having subject matter experts is still essential – meaning ChatGPT doesn’t make real estate financial modeling professionals obsolete. Instead, it makes us more efficient. And b) the process is very much a trial and error, iterative one. At first, the model’s suggested solution was wrong. Then, as we (ChatGPT and I) progressed each suggestion required feedback to ultimately get to something that worked.
Enjoy the video and then give it a try yourself!
Using GPT in Commercial Real Estate – Creating Complex Excel Logic
I continue to explore other use cases for this technology in commercial real estate. In this video, I show you a use case whereby I leverage GPT and ChatGPT to create complex Excel logic for a real estate financial model.
- Click here to read the entire ChatGPT conversation that this video is based on.
Frequently Asked Questions about Using ChatGPT to Create Complex Excel Logic in CRE
What challenge did the author face when modeling Excel logic for student housing?
The author needed to create a complex data validation list in Excel that pulled only non-blank cells from a range (where 11 of 12 were blank) and then sorted the result from smallest to largest—all to improve usability for the Student Housing Acquisition Model.
How did ChatGPT help solve the Excel logic problem?
ChatGPT acted as a knowledge base and iterative problem solver, helping the author build a formula that filtered out blank cells and sorted the list dynamically. Though the first few attempts were incorrect, the back-and-forth process eventually led to a working solution.
How did professionals create complex Excel logic before ChatGPT?
Previously, professionals relied on manual research, Excel forums, past models, and peer input. The process was highly time-consuming, often taking hours to weeks to solve complex problems like lease reimbursement logic.
Does ChatGPT replace real estate financial modeling professionals?
No. As the author notes, “having subject matter experts is still essential.” ChatGPT enhances productivity but doesn’t replace expertise. It serves as a tool to make real estate professionals more efficient and effective.
What makes ChatGPT an effective tool for creating Excel logic?
ChatGPT provides instant feedback, works iteratively, and combines a vast knowledge of Excel functions and best practices. This streamlines logic creation and reduces time spent on complex formula development.
Was the solution from ChatGPT perfect on the first try?
No. The process was trial and error, with several iterations needed. The author emphasized that real-world use of ChatGPT still involves human oversight and correction before reaching a reliable solution.
What Excel feature was the logic ultimately built for?
The complex logic was built to support a data validation list, allowing only non-blank entries to appear in a dropdown menu and sorted in ascending order—enhancing usability for model users.
What is the broader takeaway from this use case?
AI tools like ChatGPT are transforming the way professionals solve modeling challenges, offering a faster, more flexible way to create complex Excel logic, without replacing the need for human expertise and judgment.