How to Combine Address Fields in Excel and Exclude Blank Cells

📅 Jun 16, 2026 📝 Sarah Miller

Manually consolidating multi-line mailing addresses in Excel often leaves users frustrated by awkward, extra delimiters caused by empty cells. When managing contact databases for standard funding sources, maintaining clean data is paramount for professional outreach. Employing the right Excel formula grants you the power to seamlessly bypass blank rows, ensuring perfectly formatted outputs every time.

The only stipulation is that your spreadsheet software must support modern array functions. For instance, leveraging the TEXTJOIN function dynamically ignores empty cells, unlike rigid concatenation methods of the past. Below, we outline the exact formula syntax to streamline your address lists efficiently.

How to Combine Address Fields in Excel and Exclude Blank Cells

Managing address data in Excel is a common task for sales teams, marketers, logistics planners, and administrative professionals. Often, customer or client addresses are captured across multiple columns: Street Address 1, Street Address 2, Apartment/Suite, City, State, and ZIP Code. While splitting this data into granular fields is excellent for database integrity, you eventually need to merge these fields back together to print shipping labels, format invoices, or compile clean mailing lists.

The standard way to combine cells in Excel is using the concatenation operator (&) or the CONCAT function. However, a major headache arises when dealing with incomplete data. If a customer doesn't have an "Address Line 2" or a "Suite Number," a basic concatenation formula will often output messy results filled with consecutive delimiters-such as double commas (e.g., "123 Main St,, Boston, MA") or trailing commas. To prevent this, you must use smart formulas that automatically ignore empty cells and output a perfectly formatted address block. This comprehensive guide covers the best methods to achieve this across different versions of Excel.

Method 1: The Modern Standard – Using the TEXTJOIN Function

If you are using Microsoft 365, Excel 2019, Excel 2021, or Excel for the Web, the absolute best tool for this job is the TEXTJOIN function. Unlike legacy concatenation functions, TEXTJOIN allows you to specify a; insert between each text block and includes a built-in boolean argument; au; matically skip empty cells.

The TEXTJOIN Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
  • delimiter: The character(s) you want; put between your address fields (e.g., a comma and a space: ", ").
  • ignore_empty: A boolean value. Setting this; TRUE tells Excel; ignore any blank cells in the designated ranges.
  • text1, text2, ...: The individual cells or cell range containing your address parts.

Step-by-Step Example

Imagine your dataset is organized across columns A through F as shown in the table below:

Row A: Street 1 B: Street 2 C: City D: State E: Zip Code
2 100 Pine St Suite 400 San Francisco CA 94111
3 456 Oak Rd [Blank] Austin TX 78701
4 789 Maple Ave Apt 2B Chicago IL [Blank]

To combine these fields for row 2, write the following formula in column F:

=TEXTJOIN(", ", TRUE, A2:E2)

When you drag this formula down, Excel generates these perfect, clean address strings:

  • Row 2: 100 Pine St, Suite 400, San Francisco, CA, 94111
  • Row 3: 456 Oak Rd, Austin, TX, 78701 (Notice how Excel skipped the blank cell in column B without adding a double comma!)
  • Row 4: 789 Maple Ave, Apt 2B, Chicago, IL (The missing zip code is ignored cleanly without leaving a trailing comma)

Method 2: Multi-Line Formatting (Mailing Labels) with TEXTJOIN

Often, you don't want a single, continuous line of text. For physical mailing labels, you need the street addresses on their own lines, and the city, state, and zip code grouped together on the bottom line. You can combine TEXTJOIN with Excel's line-break character, CHAR(10),; design an elegant multi-line mailing block.

To construct a dynamic label that handles empty street lines seamlessly, use this formula:

=TEXTJOIN(CHAR(10), TRUE, A2, B2, TEXTJOIN(" ", TRUE, C2, D2, E2))

How this formula works:

  1. The nested formula TEXTJOIN(" ", TRUE, C2, D2, E2) groups the City, State, and Zip Code; gether in; a single line separated by clean spaces (e.g., "Austin TX 78701").
  2. The outer TEXTJOIN takes Street 1 (A2), Street 2 (B2), and the newly grouped City/State/Zip string and stacks them vertically using CHAR(10) (the line break character) as the delimiter.
  3. If B2 is empty, the outer TEXTJOIN skips it entirely, preventing an unwanted blank line in the middle of your printed label.

Note: For the line breaks; display correctly in your spreadsheet, you must select the formula cell and click the Wrap Text but; n on the Home tab of the Excel ribbon.

Method 3: The Legacy Solution – For Excel 2016 and Older

If your organization runs an older version of Excel that does not support the TEXTJOIN function, you have; use a legacy workaround. Combining cells with standard ampersands (&) requires incorporating logical IF statements; evaluate whether each cell contains data before appending delimiters.

The formula structure prepends the; a comma and space) to each field only if that field is populated, and then uses the MID or REPLACE function to strip off the very first, unwanted; the front of the combined string.

Enter the following formula to cleanly merge columns A through E on older Excel versions:

=MID(IF(A2<>"", ", " & A2, "") & IF(B2<>"", ", " & B2, "") & IF(C2<>"", ", " & C2, "") & IF(D2<>"", ", " & D2, "") & IF(E2<>"", ", " & E2, ""), 3, 9999)

Dissecting the Legacy Formula:

  • The Logical Evaluators: IF(B2<>"", ", " & B2, "") checks if cell B2 is populated. If it is, it adds a comma and space followed by the cell value (e.g., ", Suite 400"). If B2 is empty, it outputs an empty string ("").
  • The String Concatenation: By grouping these individual IF statements together with the & operator, Excel compiles a single string. If the first filled column is A2, the resulting raw string will start with an unwanted comma and space: ", 100 Pine St, Suite 400, San Francisco, CA, 94111".
  • Cleaning up the Leading Delimiter: To fix this, the MID(..., 3, 9999) function instructs Excel to look at the completed string, skip the first 2 characters (the leading comma and space), and start extracting the clean address; the 3rd character onward for up to 9,999 characters.

Method 4: Utilizing Power Query for Enterprise Datasets

If you are working with large datasets consisting of tens of thousands of rows, heavy Excel formulas can slow down your system performance. In these instances, relying on Excel's built-in Power Query tool is highly recommended. Power Query offers a visual, codeless way to merge columns while automatically ignoring null/empty rows.

  1. Select your address table, navigate to the Data tab on the ribbon, and click From Table/Range to import your data into the Power Query Editor.
  2. In the Power Query preview window, select all the address columns you wish to merge (hold down the Ctrl key while clicking each column header).
  3. Right-click on one of the selected column headers and choose Merge Columns.
  4. In the dialog box that appears, select Comma (or a custom delimiter of your choice) from the Separator dropdown list.
  5. Give your new combined column a descriptive name (e.g., "Full Address") and click OK. Power Query automatically handles null values, ensuring no extra delimiters are created.
  6. Click Close & Load in the Home tab to export your beautifully compiled address column back into a fresh Excel sheet.

Summary of Best Practices

To guarantee your merged address lists are consistently clean and error-free, keep the following data hygiene rules in mind:

  • Trim Your Spaces: Sometimes cells look blank but actually contain hidden space characters. If Excel fails to recognize an empty cell, wrap your source data or formula references in the TRIM function (e.g., TRIM(B2)) to clean out trailing and leading spaces.
  • Maintain Original Columns: Avoid deleting your source address columns after merging them. If you need to make corrections, it is far easier to edit individual "Street" or "ZIP" cells than it is to parse and edit a combined string. You can always hide the original source columns if you want a cleaner workspace.
  • Use Wrap Text for Multi-line: Remember that any formula utilizing CHAR(10) will appear as a single line with odd box characters or spaces unless you actively toggle on the Wrap Text alignment setting for those cells.

By selecting the appropriate strategy-whether utilizing the streamlined TEXTJOIN function for modern Excel versions, implementing the clever MID and IF trick for older files, or executing a Power Query workflow for massive databases-you will successfully eliminate ugly formatting flaws and keep your master address lists exceptionally professional.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.