Artikel 54
KI Grundlagen

Code Prompts for Non-Programmers: How to Use AI as Your Personal Developer

Sebastian Rydz27. Februar 202610 min Lesezeit

Have you ever sat in front of an empty Excel cell wondering how to build a specific formula? Or wanted to automate a recurring task on your computer but had no idea where to start? Here's the good news: you don't need a computer science degree or any programming knowledge to use code. AI makes it possible.

In this article, I'll show you step by step how you, as a complete non-techie, can work with AI to create, understand, and deploy code for your purposes. You'll see: it's easier than you think. And yes, it's actually fun.

Why code prompts matter for you too

Let's clear up a widespread misconception first: code isn't just for developers in dark basement offices. Code is everywhere. Every Excel formula is code. Every automation you encounter in daily life is based on code. And with AI assistants like ChatGPT, Claude, or Copilot, you can have this code created for you without being able to program yourself.

Think of it this way: you're the architect, AI is the construction worker. You describe what you want, and AI builds it. You don't need to know how to lay bricks for that. You just need to clearly describe what the finished house should look like.

The secret lies in how you formulate your prompts. A good code prompt differs significantly from a regular text prompt. It needs more structure, more context, and clearer expectations. That's exactly what you'll learn in the following sections.

Losing the fear of code: Your new mindset

Before we dive into practice, let's talk about something important: the fear of code. Many people experience a genuine mental block when they hear the word "programming." They think of cryptic strings of characters, red error messages, and years of study.

Forget all of that. With AI, you need exactly three things:

  • The ability to put your problem into words. You need to describe what you want to achieve. Not how, but what.
  • The willingness to test results. You copy the generated code, try it out, and see if it works.
  • The courage to ask questions. If you don't understand something, simply ask the AI: "Explain this formula to me line by line."

That's it. You don't need programming courses, YouTube tutorials, or a computer science degree. You need a clear prompt, and AI handles the rest.

Here's a perspective shift that helps many people: you're not writing code. You're describing an outcome, and AI translates it into code. That's a fundamental difference. You're not the programmer. You're the client.

The anatomy of a perfect code prompt

Now let's get specific. A good code prompt consists of five building blocks, which I'll show you using an example:

Building Block 1: Context and Role

Tell AI who you are and what environment you work in. For example: "I'm working in Excel with a customer list. I'm not a programmer and need simple explanations."

Building Block 2: The Desired Outcome

Describe as precisely as possible what the end result should be. Not: "Make me a formula." But: "I need a formula that automatically calculates the age in column C based on the birth date in column B."

Building Block 3: Sample Data

Give AI concrete examples. "In cell B2, for instance, is 03/15/1990. In C2, 35 should appear (the current age)."

Building Block 4: Constraints and Requirements

Mention everything that matters: "The formula must work in the English version of Excel. Please use commas as separators."

Building Block 5: Explanation Format

Request an explanation: "After that, explain step by step what each part of the formula does."

Here's the complete prompt in action:

"I'm working in Excel (English version) with a customer list. Column B contains birth dates in MM/DD/YYYY format, for example 03/15/1990 in cell B2. I need a formula for column C that automatically calculates the current age in years. Please use English formula syntax. Then explain each part of the formula as if I were a complete beginner."

See the difference? This prompt delivers a working formula plus an understandable explanation. A vague prompt like "Make me an age formula" would deliver a generic formula without context instead.

Getting AI to create Excel formulas for you

Excel is the perfect entry point into the world of code prompts. Almost everyone uses Excel or Google Sheets, and the formulas are manageable enough to follow. At the same time, they can get quite complex, which is where AI provides real value.

Here are some examples of powerful Excel prompts:

Example 1: Conditional Calculations

"I have a table in Excel with sales data. Column A contains product names, Column B the region (North, South, East, West), and Column C the revenue. Create a formula that calculates the total revenue only for the North region."

Example 2: Text Manipulation

"Column A contains full names in 'First Last' format, for example 'Anna Smith'. I need a formula for Column B that extracts only the last name. Explain the formula step by step."

Example 3: Nested Formulas

"I need a formula that implements the following logic: if the value in cell B2 is greater than 1000, 'Premium' should appear. If it's between 500 and 1000, 'Standard' should appear. For anything below 500, 'Basic' should appear."

The beauty of it: after AI delivers the formula, you can immediately paste it into your Excel and test it. If it doesn't work, simply tell AI: "The formula throws an error: #VALUE! What's wrong?" And AI helps you debug. No programming knowledge needed whatsoever.

Creating automations with AI: Your starting point

Once you're comfortable with Excel formulas, you can take the next step: automations. And don't worry, you don't need to program anything here either. You simply describe what should be automated, and AI creates the code.

Here are typical automations you can implement as a non-programmer:

Email Automation:

"I use Google Sheets and want an email to be sent automatically when 'overdue' is entered in Column D. Create a Google Apps Script for this. Explain every step of the setup as if I've never seen a script before."

File Organization:

"I have a folder on my Windows PC with hundreds of PDF files that all start with a date (format: 2025-01-15_Invoice.pdf). I want these files to be automatically sorted into subfolders by month (e.g., folder '2025-01' for January). Create a Python script for this and explain step by step how to run it."

Data Cleaning:

"I have a CSV file with customer data, but the phone numbers are in various formats (with and without area codes, with spaces, with hyphens). Create a script that converts all phone numbers to a uniform format: +1 (XXX) XXX-XXXX. Explain how I use the script."

The key with automations is always the same: you describe the "what" and AI delivers the "how." And when you request the explanation, you gradually understand what the code does. This way, you naturally build a basic technical understanding over time.

Common mistakes with code prompts and how to avoid them

From my experience, there are several common mistakes that non-programmers make with code prompts. Here are the most important ones and how to avoid them:

Mistake 1: Being too vague

Bad: "Make me an Excel formula for my table."

Better: "Create a VLOOKUP formula that pulls the price from the price list in Sheet2 (Column A: product name, Column B: price) into my order table in Sheet1 (Column C), based on the product name in Column A."

Mistake 2: Not providing sample data

Without sample data, AI guesses what your data looks like. This almost always leads to formulas that don't fit. Always provide at least two to three example rows.

Mistake 3: Not asking for an explanation

If you just copy the code without understanding it, you can't adapt it later. Always request an explanation. This way you learn along the way and get better with every prompt.

Mistake 4: Wanting everything at once

If you need a complex automation, break it into smaller steps. Have AI solve the first step, test it, then move to the next. This is more reliable than one massive prompt for everything.

Mistake 5: Not mentioning the environment

Always tell AI where the code should run. Excel, Google Sheets, Windows, Mac, Python, JavaScript: it makes a huge difference. An Excel formula with the wrong regional syntax won't work in your version.

Advanced techniques: Iterative prompt refinement

Experienced prompt writers know: the first prompt rarely delivers the perfect result. The real art lies in refinement. And this works particularly well with code prompts because code is testable. You immediately see whether it works or not.

Here's a typical workflow for iterative refinement:

Step 1: You send your first prompt and receive code.

Step 2: You test the code in your environment.

Step 3: You report the result back: "The formula basically works, but it doesn't handle empty cells. When B5 is empty, the formula shows an error."

Step 4: AI improves the code based on your feedback.

Step 5: You test again and repeat as needed.

This cycle of prompting, testing, and refining is incredibly powerful. After three to four rounds, you typically have a robust solution that does exactly what you need.

A pro tip: when AI makes an error, copy the error message verbatim into your next prompt. Error messages contain technical information that helps AI immediately identify and fix the problem.

Hands-on exercise: Getting an Excel formula explained

Now it's your turn. This exercise helps you apply the techniques from this article right away. It consists of three parts:

Part 1: Have a formula created

Open ChatGPT, Claude, or any other AI of your choice and enter the following prompt:

"I'm working in Excel and have a table with employee data. Column A contains names, Column B the department (Sales, Marketing, IT, HR), and Column C the monthly salary. Create a formula that calculates the average salary for the Sales department."

Part 2: Request an explanation

After receiving the formula, write:

"Explain this formula word by word. What does each individual part do? Explain it so that someone with no Excel knowledge can understand it."

Part 3: Extend it

Now request an extension:

"Extend the formula so that it only considers salaries above $3,000. Also explain what changed and why."

With this three-part exercise, you experience the complete cycle: Create, Understand, Extend. And you'll notice that working with AI as a team is actually enjoyable.

Your path from user to code conductor

Let me wrap up with the key takeaways. In this article, you learned that code prompts don't require programming knowledge. You describe the result, AI delivers the code. You've learned the five building blocks of a perfect code prompt: context, outcome, sample data, constraints, and explanation format.

You now know how to have AI create and explain Excel formulas. You've seen how automations become possible without programming skills. And you know the common mistakes to avoid.

The most important point: you're not a programmer and you don't need to become one. You're a code conductor. You set the direction, and AI plays the notes. The better your instructions become, the more impressive your results will be. Start with the exercise today and discover what's possible.

Autor

Sebastian Rydz

Das OptiPrompt Team teilt Wissen und Best Practices rund um KI und Prompt Engineering, um dir zu helfen, bessere Ergebnisse mit KI-Modellen zu erzielen.

Bereit, deine Prompts zu optimieren?

Erstelle mit OptiPrompt professionelle Prompts in Sekunden – kostenlos starten.