Excel formulas are great until you need to stack 10 of them inside each other—one wrong bracket can ruin your entire afternoon. You can skip the headache by moving that logic into Power Query. Conditional columns let you build “if/then” rules visually, keeping your data clean and easier to manage.
First, I’ll walk through how to use the Conditional Column tool, then I’ll show you how to apply it to three common real-world scenarios.
Ditch the parentheses of doom
If you find yourself staring at a formula bar that looks more like a wall of Morse code than a calculation, you’ve likely hit the limits of standard Excel functions. Nested IF statements are the traditional way to handle multiple outcomes, but they’re notoriously difficult to audit. If a single bracket is misplaced, the formula can break entirely. Even when the syntax is correct, a minor logic error can make the results difficult to debug. Power Query’s Conditional Column tool replaces this manual formula writing with a visual, fill-in-the-blank interface.
Stop writing nested IFs and IFS formulas in Excel: Use SWITCH instead
Write cleaner Excel logic by eliminating repetitive and lengthy formulas.
While Power Query can pull from any Excel range, I’d strongly recommend that you format your data as an Excel table (Ctrl+T) first. Tables are dynamic, so when you add new rows, Power Query will include them the next time you refresh the query. Once your data is formatted and your table is named:
- Select any cell in your table, then go to the Data tab and click From Table/Range to launch the Power Query Editor.
- Open the Add Column tab and click Conditional Column.
- Start by entering a descriptive label in the New column name field.
To build a rule, you need to fill out a row of four fields:
- Column Name: The existing column you want to evaluate.
- Operator: The logic (such as “is greater than,” “contains,” “begins with,” and so on).
- Value: The threshold or text you’re looking for.
- Output: What the new column should display if the rule is met.
Notice the small icons next to the Value and Output boxes. By default, these are set to ABC123 (static text or numbers), but you can click them to select a Column Name instead—allowing you to compare two different columns against each other.
To finish the logic, use the following:
- The Add Clause button: Use this to stack “Else If” rules for multiple tiers.
- The Else section: This is your catch-all for anything that doesn’t meet your rules, ensuring every row receives an output value.
The interface uses a top-down order of operations. If a row meets the first criterion, it stops there. If not, it moves to the next one.
When you’ve finished, click OK. Power Query places your new column toward the far right by default, but you can rearrange columns afterward by dragging the headers.
If you realize you missed a category or need to adjust a threshold, simply double-click the Added Conditional Column step in the Applied Steps pane on the right of the Power Query Editor window and make your adjustment.
Then, go to Home > Close & Load > Close & Load To to load the dataset with your new conditional column to an existing worksheet or a new one. When you add new data to your source table, just right-click the results and click Refresh to apply the logic instantly.
To follow along as you read, download a free copy of the example Excel workbook. After you click the link, you’ll find the download button in the top-right corner of your screen, and when you open the file, you can access each use case on a separate worksheet tab.
Use case 1: Complex tiering
Moving beyond basic categories
Conditional columns turn raw numbers into meaningful groups, making it easier to structure logic and reduce the risk of overlapping conditions when rules are ordered correctly.
The scenario: You need to assign sales reps to a performance tier: anyone over $10,000 is Platinum, over $5,000 is Gold, and everyone else is Standard.
Here’s how to do this:
- Launch the Conditional Column dialog and name your new column Performance Tier.
-
Fill in the fields for the first condition as follows:
- Column Name: Revenue
- Operator: is greater than or equal to
- Value: 10000
- Output: Platinum
- Click Add Clause and repeat the process for Gold with the operator set to is greater than or equal to and a value of 5000.
- In the final Else box, type Standard.
- Click OK, and your new conditional column appears on the right of your query.
You don’t need VBA to auto-refresh your Power Queries in Excel
Stop relying on manual clicks and clunky code—let Excel refresh your queries automatically.
Use case 2: Clean up messy text strings
Using “contains” to fix inconsistent data
The “contains” operator is a game-changer because it performs a substring match, finding text anywhere within the string.
The scenario: Your Notes column contains inconsistent entries, such as “Late – driver delay,” “Delayed by weather,” and “Client rescheduled.” You want a single column that simply says “Late” if any related keywords appear.
Once you’ve used the Conditional Column tool for the first time, it becomes a straightforward part of your workflow. However, text matching in Power Query can sometimes produce unexpected results if your data isn’t standardized—for example, a value like “delayed” might not always match “Delayed”—which is why there’s an extra normalization step before applying conditions:
- Select your Notes column and click Transform > Format > Lowercase.
- Open the Conditional Column dialog and name the column Status Group.
-
For the first condition:
- Column Name: Notes
- Operator: contains
- Value: late (make sure this is lowercase to match your standardized text).
- Output: Late
- Click Add Clause and repeat the steps for the keywords delay and reschedule.
- In the Else field, type On Time.
- When you click OK, the comments are neatly categorized according to their keywords.
Clean up messy Excel data fast with fuzzy matching in Power Query
Merge lists even with typos and inconsistent names. Tune the similarity threshold, use a transform table, and audit results before loading.
Use case 3: Build a fail-safe for errors
Using the “Else” field as a data filler
The “Else” state ensures every row receives an output value, making it easy to spot data that doesn’t fit your expected patterns.
The scenario: You categorize items as “Electronics,” “Homeware,” and “Office” based on ID prefixes. You want to ensure new, unplanned categories don’t break your report.
Here are the steps:
- Add a Conditional Column and name it Category Audit.
-
First, define your rules for Electronics:
- Column Name: Product ID
- Operator: begins with
- Value: ELEC
- Output: Electronics
- Click Add Clause and repeat the process for Homeware and Office.
- For the Else field, type Needs Review so you’re reminded to double-check these IDs and decide what to do with them.
- Click OK to see your new categories in action.
You don’t have to live in a world of endless parentheses and broken logic gates. Moving your “if/then” rules into a conditional column makes your data easier to read and much harder to break. Once you see how much faster your workflow becomes, take half an hour to explore other Power Query transformation tools—you’ll probably find that they handle many everyday tasks more efficiently than standard Excel formulas.
- OS
-
Windows, macOS, iPhone, iPad, Android
- Free trial
-
1 month
Microsoft 365 includes access to Office apps like Word, Excel, and PowerPoint on up to five devices, 1 TB of OneDrive storage, and more.

