SmartQueryTools

Coalesce Columns in Excel Files Online

Fill null values in Excel files from other columns — return the first non-null value across up to 8 columns in priority order. Add the result as a new column. Runs entirely in your browser.

How to coalesce Columns in Excel files

  1. Drop your file onto the upload area. The first two columns are placed in slots 1 and 2 as a starting point, and the first 200 rows are shown.
  2. Set the columns in priority order. Slot 1 is checked first, then slot 2, and so on. Use "+ Add column" for up to 8 columns, or the cross to remove one.
  3. Name the output column. The default is "coalesced".
  4. Click Coalesce Columns. The new column is added at the end and every original column is kept.
  5. Check the preview and download the file in the same format you uploaded.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A sports club membership list has three phone columns filled in unevenly. The coach needs one phone number per member for a text alert, preferring mobile, then work, then home.

Input (Excel)

Excel workbook, first sheet (Sheet1)

member_idmobilework_phonehome_phone
M-01021 555 0142NULL09 555 7710
M-02NULL04 555 330104 555 9120
M-03NULLNULL03 555 6604
M-04NULLNULLNULL

Settings

  • Columns (in priority order): 1. mobile, 2. work_phone, 3. home_phone
  • Output column name: contact_phone

Result

member_idmobilework_phonehome_phonecontact_phone
M-01021 555 0142NULL09 555 7710021 555 0142
M-02NULL04 555 330104 555 912004 555 3301
M-03NULLNULL03 555 660403 555 6604
M-04NULLNULLNULLNULL

Each row takes the first phone number that is present, checking mobile, then work_phone, then home_phone. M-01 has a home number too, but mobile wins because it is first. M-02 has no mobile, so the work number is used. M-04 has no numbers at all, so contact_phone is empty. The three source columns are left as they were.

Working with Excel files

Blank cells on the first sheet load as NULL and are skipped. A formula that returns "" also comes through as empty, so IFERROR(..., "") lookups behave as missing values. Cells that look blank but hold a single space, or show a dash from an accounting format, are read as text and win the coalesce. Clear those cells in Excel, or clean the values after loading.

Each cell is read as the text Excel shows, so a column formatted as currency, like "$45.00", loads as text, while an unformatted number column loads as a number. Coalescing those two together fails with a type error. Keep the source columns in the same display format, or cast them before running. Dates are different. Any cell with an Excel date format loads as a real date, so two date columns chain cleanly even if one shows 3/2/26 and the other 2 March 2026. A date column typed as text, or left in General format as serial numbers, will not chain with a real date column. The downloaded workbook adds the new column at the far right of Sheet1, and the original columns stay in place for checking.

Frequently Asked Questions

Why is an empty-looking Excel cell not being skipped?

It probably contains a formula that returns an empty string, or a space. Those are text values, not blanks. Only truly empty cells are treated as missing.

Can I coalesce columns from two different Excel sheets?

Not directly. Only the first sheet is read. Combine the sheets with Merge or a lookup first, then coalesce the matching columns.

How many columns can I coalesce at once?

Between 2 and 8. The button stays disabled until at least two slots have a column picked.

Does coalesce change the original columns?

No. It adds one new column at the end and leaves every original column untouched. Drop the source columns afterwards with Manage Columns if you no longer need them.

Can I put a default value at the end of the chain?

Not in this tool, which only accepts columns. Run Fill Empty Values on the coalesced column afterwards to replace the remaining empty cells with a fixed value such as "unknown".

Related Tools