View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Concatenate with date range

You can use a UDF function like below


call with
=CatNames(A1:A100, FY!E3:E4)



Function CatNames(Target As Range, Dates As Range)
StartDate = Dates(1)
EndDate = Dates(2)

CatNames = ""
For RowOffset = 1 To Target.Rows.Count
If (Target(RowOffset, 2) = StartDate And _
Target(RowOffset, 2) <= EndDate) Or _
(Target(RowOffset, 3) = StartDate And _
Target(RowOffset, 3) = EndDate) Then

CatNames = CatNames & "," & Target(RowOffset, 1)
End If
Next RowOffset

End Function



"Pete@cadth" wrote:

Hi,

I have 3 columns and multiple rows.
Column A contains the product name
Column B contains the start date
Column C contains the completion date

I would like to concatenate all the product names within a specified date
range into 1 cell. I already have my date range identified in another tab
(i.e. FY!E3:E4)
Any ideas how I can do this?

Thanks.