Programming

Google Sheets Formula: Append Date to Filtered Names

Modify your Google Sheets formula using TEXTJOIN and FILTER to append dates to recipient names like 'Name (Date)'. Perfect for tracking sheets with Product ID, status, and country filters. Step-by-step guide and examples.

1 answer 1 view

How can I modify this Google Sheets formula to append the corresponding date to each filtered recipient so the result is “Recipient name 1 (Date 1), Recipient name 2 (Date 2)” in a single cell? I have a Tracking sheet with columns: A = Date, B = Product ID, F = Recipient name, G = Country, I = Status (include only “1. Shipped” and “2. Received”). In the Inventory sheet, column A is Product ID and AU2containsCountry.MycurrentformulaonInventoryis:=JOIN(",",FILTER(Tracking!2 contains Country. My current formula on Inventory is: `=JOIN(", ",FILTER(Tracking!F2:2:F,Tracking!$B2:2:B=A3,(Tracking!A3,(Tracking!I2:2:I=“1. Shipped”)+(Tracking!$I2:2:I=“2. Received”),Tracking!$G2:2:G=AU$2))` which returns e.g. “Recipient name 1, Recipient name 2”. How can I change it to include the matching date from Tracking!A for each recipient so each name becomes “Recipient name (Date)” and they are joined by ", " in one cell?

To append the corresponding date to each filtered recipient name in your Google Sheets formula, replace JOIN with TEXTJOIN and concatenate the recipient from Tracking!F with the formatted date from Tracking!A inside the FILTER function. The updated Google Sheets formula becomes:

=TEXTJOIN(", ", TRUE, FILTER(Tracking!$F$2:$F & " (" & TEXT(Tracking!$A$2:$A, "mm/dd/yyyy") & ")", Tracking!$B$2:$B=$A3, (Tracking!$I$2:$I="1. Shipped")+(Tracking!$I$2:$I="2. Received"), Tracking!$G$2:$G=AU$2))

This spits out exactly what you want: “Recipient name 1 (01/15/2026), Recipient name 2 (01/16/2026)” in one cell, pulling only matching Product IDs, statuses, and countries.


Contents


Understanding Your Current Setup

Your existing formula does a solid job filtering recipients—nice work there. It grabs names from Tracking!F where Product ID matches A3, status is either “1. Shipped” or “2. Received,” and country hits AU$2. But it stops at plain names like “Bob, Alice.” You need those dates from column A tacked on, right? Something like “Bob (01/15/2026), Alice (01/16/2026).”

Why tweak it? Google Sheets FILTER pulls arrays great, but to mash names and dates per row before joining, you concatenate inside the filter. No need for QUERY or scripts—this stays simple and fast. Folks run into this all the time when building reports, as seen in community fixes like this Stack Overflow thread.


The Updated Google Sheets Formula

Drop this in your Inventory sheet cell (say, wherever your old JOIN sat):

=TEXTJOIN(", ", TRUE,
 FILTER(
 Tracking!$F$2:$F & " (" & TEXT(Tracking!$A$2:$A, "mm/dd/yyyy") & ")",
 Tracking!$B$2:$B = $A3,
 (Tracking!$I$2:$I = "1. Shipped") + (Tracking!$I$2:$I = "2. Received"),
 Tracking!$G$2:$G = AU$2
 )
)

Boom. Test it—copy-paste, hit enter. If no matches? Blank cell, no errors. TEXTJOIN ignores empties thanks to that TRUE flag.

Want it shorter? Google Sheets lets you skip line breaks; just smash it into one line if you prefer.


Step-by-Step Breakdown

Let’s unpack why this Google Sheets formula with TEXTJOIN FILTER nails it. Start from the inside.

First, the magic concatenation: Tracking!$F$2:$F & " (" & TEXT(Tracking!$A$2:$A, "mm/dd/yyyy") & ")". This builds an array like [“Bob (01/15/2026)”, “Alice (01/16/2026)”, …] for every row. & glues strings; TEXT formats dates nicely (dates in Sheets are serial numbers under the hood).

Then FILTER keeps only rows matching your criteria:

  • Product ID: Tracking!$B$2:$B = $A3
  • Status: (Tracking!$I$2:$I = "1. Shipped") + (Tracking!$I$2:$I = "2. Received")—the + acts as OR.
  • Country: Tracking!$G$2:$G = AU$2

Finally, TEXTJOIN(", ", TRUE, [that filtered array]) smushes 'em with commas. Why TEXTJOIN over JOIN? JOIN chokes on arrays with extras; TEXTJOIN handles it smoothly, skipping blanks.

Picture your data:

A (Date) B (Prod ID) F (Recipient) G (Country) I (Status)
2026-01-15 Prod1 Bob AU 1. Shipped
2026-01-16 Prod1 Alice AU 2. Received

For Prod1 in A3? Perfect match.

Ben Collins’ advanced FILTER guide covers similar tricks if you dig deeper.


Customization and Common Fixes

Dates not showing right? Swap “mm/dd/yyyy” for “dd/mm/yyyy” or “yyyy-mm-dd”—whatever your locale needs. Russian users? Try “dd.mm.yyyy”.

No results? Check:

  • Dates in A are true dates (not text—use ISDATE to verify).
  • Status strings match exactly (no extra spaces).
  • Ranges cover all data (e.g., $2:$1000 if needed).

Scale it? Drag the formula down column A matches other products. For huge sheets, it stays snappy since FILTER is efficient.

Edge case: Multiple same-name recipients same day? It’ll list 'em separately: “Bob (01/15), Bob (01/15)”. Cool?

Tutorials like Ablebits on FILTER or Coupler.io’s how-to expand on date handling in google sheets filter.


Sources

  1. Stack Overflow: Append results of a filter within results of another filter
  2. Ben Collins: Advanced FILTER examples in Google Sheets
  3. Ablebits: How to use Google Sheets FILTER function
  4. Coupler.io: FILTER Function Google Sheets How-To Guide
  5. Google Docs Editors Community: Google sheet array formula + Join + Filter

Conclusion

This Google Sheets formula upgrade with TEXTJOIN and inline concatenation turns your basic recipient list into a date-stamped powerhouse—perfect for inventory tracking. You’ve got the full recipe: plug it in, tweak the date format, and you’re set. Next time traffic spikes or audits hit, you’ll thank that precise “Name (Date)” output. Questions? Test it live and iterate.

Authors
Verified by moderation
Moderation
Google Sheets Formula: Append Date to Filtered Names