I am trying to figure out how to setup a couple excel sheets that combs through ALOT of information. I can not display the actual excel sheet due to what's in it but I have recreated an excel that would do the same thing.
I am trying to get the dates to populate automatically when the CountIF finds something... Say, Blake shows up multiple times in the data range I need it to look through, I need all the dates or at least the most recent date to populate on its own in 1 cell next to the CountIf number or in the same cell as the CountIf.
The cell should display 06/22/2022, 06/29/2022.
I am using Excel 2016, I do not have a built in TEXTJOIN.
@scott, Thank you for responding, I added your TEXTJOIN UDF and I am getting a #VALUE! message in some of the cells, not all of them..? but everything is formatted the same. The only difference between the example excel and my work excel is the sheet im calling the data from is formatted like the below formula, and the location I am calling the info on is in a different sheet so the formula looks like
=TEXTJOIN(",",TRUE,IF('SHEET2!E:E="example-A-1",'SHEET2!A:A,""))
Using this UDF
Function TEXTJOIN(delim As String, skipblank As Boolean, arr)
Dim d As Long
Dim c As Long
Dim arr2()
Dim t As Long, y As Long
t = -1
y = -1
If TypeName(arr) = "Range" Then
arr2 = arr.Value
Else
arr2 = arr
End If
On Error Resume Next
t = UBound(arr2, 2)
y = UBound(arr2, 1)
On Error GoTo 0
If t >= 0 And y >= 0 Then
For c = LBound(arr2, 1) To UBound(arr2, 1)
For d = LBound(arr2, 1) To UBound(arr2, 2)
If arr2(c, d) <> "" Or Not skipblank Then
TEXTJOIN = TEXTJOIN & arr2(c, d) & delim
End If
Next d
Next c
Else
For c = LBound(arr2) To UBound(arr2)
If arr2(c) <> "" Or Not skipblank Then
TEXTJOIN = TEXTJOIN & arr2(c) & delim
End If
Next c
End If
TEXTJOIN = Left(TEXTJOIN, Len(TEXTJOIN) - Len(delim))
End Function