Formula.Firewall Error in Power Query & Power BI: Rebuild This Data Combination Solved (MSPTDA 9.5)

Learn how to deal with Power Query Error: Formula.Firewall: Query references other queries or steps, so it may not directly access a data source. Please rebuild this data combination. Two solutions are presented in this video.
Download Files: Excel Start: https://ift.tt/2L7OwpO
Zipped Folder: https://ift.tt/2PShOvY
Download Excel FINISHED Files: https://ift.tt/2MsL7Hs
Download pdf Notes about Power Query: https://ift.tt/2wkNW2K
Assigned Homework – these are problems for you to practice your new M Code skills:
Download Excel File with Homework: https://ift.tt/2MmtxFf
Example of Finished Homework: https://ift.tt/2L7OxtS

Chris Webb’s blog about this topic: https://ift.tt/2NATkG3
Ken Puls blog about this topic: https://ift.tt/2PShRb8

Comprehensive Microsoft Power Tools for Data Analysis Class, BI 348, taught by Mike Girvin, Excel MVP and Highline College Professor.

View on YouTube

excel vlookup tutorial for beginners to advanced with examples

VLOOKUP Function Beginner to Advanced With Examples: How To Use Excel VLOOKUP Function

What is VLOOKUP and why it matters

The Excel VLOOKUP function searches for a value in the first column of a table and returns a value from a specified column in the same row, which makes it perfect for pricing lookups, HR rosters, invoices, commissions, and taxonomy maps across large datasets without manual searching. VLOOKUP’s syntax is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) where the lookup value must be in the leftmost column of the table array, the return column is selected by index, and the final argument controls exact vs. approximate matching.

Exact match VLOOKUP for clean lookups

For unique identifiers like IDs, SKUs, or emails, use exact match with FALSE (or 0) to return only precise matches and avoid unexpected results, which is the most common production pattern in business workbooks. A typical formula is =VLOOKUP(E2, $A$2:$C$11, 2, FALSE), with the table range locked using absolute references so it copies reliably down a column while the lookup reference remains relative for each row.

Approximate match VLOOKUP for bands and tiers

Approximate match is ideal for tax brackets, commission tiers, shipping rates, or grade scales, where the first column is sorted ascending and Excel returns the closest value less than or equal to the lookup value when an exact match doesn’t exist. When the last argument is TRUE or omitted, VLOOKUP returns the next smaller match in a sorted table, which is essential for continuous ranges like “income-to-tax-rate” or “sales-to-commission” bands.

Preventing errors with IFERROR and best practices

Production-grade sheets guard against #N/A and related issues by wrapping VLOOKUP in IFERROR to show a clean message or blank when a value is missing, and by using data validation lists to eliminate typos at the source of the lookup value. Following best practices like locking the table with $A$2:$D$100, ensuring the lookup key sits in the leftmost column, and documenting whether a formula is exact or approximate match will make your workbooks resilient and easier to maintain.

Cross-sheet and cross-workbook references

VLOOKUP works seamlessly across sheets and files by including sheet names (Sheet2!$A$2:$D$100) or external workbook paths in the table_array, which enables central lookup catalogs, shared master data, and distributed models while preserving consistent references via absolute ranges. When linking to closed workbooks, Excel embeds the file path in the reference, so keeping related files together and stable is important for long-term reliability.

Dynamic col_index_num with MATCH

Hard-coding the column index makes models brittle; pairing VLOOKUP with MATCH on the header row creates a dynamic column index that automatically adapts when columns are moved or new fields are inserted. For example, =VLOOKUP($E2, $A$2:$Z$100, MATCH($G$1, $A$1:$Z$1, 0), FALSE) uses the header text in G1 to return the correct column even if the schema changes, which is a best-in-class pattern for durable reports.

Horizontal and vertical record retrieval

Full-record retrieval can be automated horizontally with COLUMNS and vertically with ROWS to pull multiple adjacent fields from a single VLOOKUP key without manual indexing, which is useful for summary views, profile cards, and line items. Using expandable ranges with COLUMNS(B8:B8)+1 for horizontal sequences or ROWS(B22:B22)+1 for vertical sequences produces 1, 2, 3 indices as formulas copy, keeping the sheet tidy and dynamic.

Multi-criteria VLOOKUP strategies

VLOOKUP returns the first match and can’t natively filter duplicates, so multi-criteria lookups are solved by creating a helper “join key” column (e.g., =A2&”|”&B2) and using the same join in the lookup value, which creates a unique, leftmost key VLOOKUP can read. If schema changes are not allowed, an advanced alternative uses CHOOSE inside VLOOKUP to construct a two-column virtual table in-memory, enabling multi-field keys without altering the source range, which is powerful for protected or external datasets..

Partial text lookups and text-number mismatches

Real data often requires extracting part of a code to perform a lookup, where LEFT/RIGHT/MID combined with SEARCH finds variable-length segments like prefixes before a dash, or three-character mids after a delimiter, creating consistent keys to match against the table. When numbers are stored as text (or vice versa), coercing with +0 or VALUE ensures reliable matching, and using TRIM removes hidden spaces that can otherwise cause #N/A even when values look identical on screen.

VLOOKUP limitations and when to use alternatives

VLOOKUP only looks to the right, is case-insensitive, and returns only the first match, which can be restrictive in analytics and deduping workflows, especially in wide tables where column order changes over time. More flexible patterns include INDEX/MATCH for left-lookups or returning nth matches, and modern functions like XLOOKUP that support bidirectional lookup, exact/approximate logic, default values, and built-in error handling with a cleaner syntax for both beginners and power users.

VLOOKUP examples you can copy

Basic exact match (best for IDs, SKUs)
=VLOOKUP(E2, $A$2:$D$100, 3, FALSE) returns the value from the 3rd column where A matches E2 in a locked table range for safe copying.

Approximate match for tiers (sorted ascending)
=VLOOKUP(E2, $A$2:$C$20, 2, TRUE) returns the banded rate or amount when E2 falls between thresholds in the first column, which must be ascending.

Dynamic column with MATCH
=VLOOKUP($E2, $A$2:$Z$100, MATCH($G$1, $A$1:$Z$1, 0), FALSE) adapts to column moves by resolving the column index from header text in G1.

Multi-criteria with helper join
=VLOOKUP($H2&”|”&$I2, $A$2:$E$100, 5, FALSE) matches two inputs by concatenating them to a unique leftmost key (e.g., Name|State).

CHOOSE-based two-key (no schema change)
=VLOOKUP($H2&”|”&$I2, CHOOSE({1,2}, $A$2:$A$100&”|”&$B$2:$B$100, $E$2:$E$100), 2, FALSE) builds a virtual two-column table for a composite key without adding a helper column.

Partial text before a dash
=VLOOKUP(LEFT(E2, SEARCH(“-“, E2)-1), $A$2:$C$100, 2, FALSE) extracts the left segment as the key when source IDs contain a prefix-delimiter pattern.

Coercing text numbers
=VLOOKUP(VALUE(MID(E2, SEARCH(“-“, E2)+1, 3)), $A$2:$C$100, 2, FALSE) converts a three-digit middle segment to a number for consistent matching.

Trim hidden spaces reliably
=VLOOKUP(TRIM(E2), $A$2:$D$100, 3, FALSE) cleans errant whitespace in the lookup value; if spaces are in the table’s first column, apply TRIM to that column or reconstruct a trimmed array pattern where appropriate.

Pro tips for learning

Beginners should start with exact matches on clean tables and practice absolute references, then add IFERROR to handle missing keys gracefully, and use data validation to reduce typos in lookup cells during entry, which mirrors enterprise data hygiene. Intermediate and advanced users benefit from MATCH-driven column selection, helper columns for multi-key joins, CHOOSE-based virtual tables when schemas are locked, and partial text extraction patterns that mirror real-world IDs from CRMs, ERPs, and finance systems

keywords: excel vlookup tutorial for beginners to advanced with examples, vlookup help, vlookup.

Other resources to help you:

  1. https://www.ablebits.com/office-addins-blog/excel-vlookup-tutorial/
  2. https://support.microsoft.com/en-us/office/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1
  3. https://www.excel-easy.com/examples/vlookup.html
  4. https://www.goskills.com/Excel/Resources/VLOOKUP-exact-match-approximate-match
  5. https://www.w3schools.com/excel/excel_vlookup.php
  6. https://www.youtube.com/watch?v=-hJxIMBbmZY
  7. https://www.extendoffice.com/documents/excel/6393-excel-vlookup-function.html
  8. https://www.youtube.com/watch?v=DZEPA9UhLBw
  9. https://www.semrush.com/blog/how-to-choose-long-tail-keywords/
  10. https://www.youtube.com/watch?v=xIynD1gFOLo
  11. https://www.ablebits.com/office-addins-blog/vlookup-formula-examples/
  12. https://www.youtube.com/watch?v=v5l82vjuMpY
  13. https://www.youtube.com/playlist?list=PL856071E833250503
  14. https://www.youtube.com/watch?v=w0KQ5ByxELo
  15. https://www.reddit.com/r/excel/comments/16szzbc/teach_me_vlookup_in_excel/
  16. https://www.youtube.com/watch?v=zqFE6uIJ65s
  17. https://www.youtube.com/watch?v=ck9MR95MtZg
  18. https://www.youtube.com/watch?v=ZGKpXh426Ko
  19. https://www.youtube.com/user/ExcelIsFun
  20. https://www.youtube.com/watch?v=-1BDpwCxyug
  21. https://www.youtube.com/watch?v=d3BYVQ6xIE4
code execution vba

Code Execution Has Been Interrupted- VBA Keeps Breaking – Solved!

How to stop code execution has been interrupted error in Excel VBA.

My Excel VBA Keeps Breaking: A “code execution has been interrupted” keeps coming up, but my Code is Not “Broken”

It’s 2025 and this is still happening, so I just have to share this handy trick.  Sometimes when I’m running VBA code in Excel, it starts getting wonky.  The Break/Debug window keeps popping up during execution, for no good reason.  Code execution has been interrupted, over and over.    The code has run perfectly fine in the past, perhaps hundreds of times.  It’s almost as if something is stuck and hanging in the background.  Restarting Excel does no good.  It seems that the VBA interface itself needs a reset, but clicking reset does nothing.  It’s quite frustrating.

There is a Solution!!

code execution has been interrupted window

When you receive the code execution has been interrupted pop-up,  click Debug.

Then press Ctrl+Pause/Break twice.

Click on the Green Arrow or press F5 to resume.

You should be good to go, as long as there is nothing inherently wrong with your VBA code!

I’m not sure how or why this works,but it does. I think there may be some sort of bug in Excel, so hopefully it will be fixed at some point.  I hope this helps you as much as it has helped me!  Simple solutions sure are the best!

Comment below and let me know if there are other issues you would like me to solve!

Save