First off I would like to say that I've spent the better part of today looking for a solution to this problem. Everything that I've come across says to add "Application.Volatile" to the beginning of the macro. Adding "Application.Volatile" to the macro doesn't seem to do anything. Hopefully someone can figure out what's going on.
FYI my VBA skills aren't very strong.
I found the following UDF posted online that works beautifully. The UDF concatenates a range of cells and includes an option to include a delimiter.
The data I need to be concatenated is produced using a combination of FIND and INDEX/MATCH. This portion also works beautifully.
When I update cells within the array used in INDEX my FIND, INDEX/MATCH formula continues to work as expected. However this is not the case with my MultiCat UDF.
For example. If I have the following contatenation result:
Spring 2000, Spring 2001, Summer 2001
and I update a value (Fall 2000) in my INDEX array I expect the following result:
Spring 2000, Fall 2000, Spring 2001, Summer 2001
Unfortunately after entering the data nothing changes. If I update a different cell in the array (e.g. Fall 2001), I end up getting the result I expected in the previous step but not the new change. The UDF continues to be one step behind after each calculation.
Please note that as I stated earlier, adding "Application.Volatile" has no affect on the result of the UDF.
I think that's everything. Let me know if I'm missing any key information.
Thanks,
Hal
Windows XP
Excel 2007
FYI my VBA skills aren't very strong.
I found the following UDF posted online that works beautifully. The UDF concatenates a range of cells and includes an option to include a delimiter.
Code:
Public Function MultiCat( _
ByRef rRng As Excel.Range, _
Optional ByVal sDelim As String = "") _
As String
Dim rCell As Range
For Each rCell In rRng
MultiCat = MultiCat & sDelim & rCell.Text
Next rCell
MultiCat = Mid(MultiCat, Len(sDelim) + 1)
End Function
The data I need to be concatenated is produced using a combination of FIND and INDEX/MATCH. This portion also works beautifully.
When I update cells within the array used in INDEX my FIND, INDEX/MATCH formula continues to work as expected. However this is not the case with my MultiCat UDF.
For example. If I have the following contatenation result:
Spring 2000, Spring 2001, Summer 2001
and I update a value (Fall 2000) in my INDEX array I expect the following result:
Spring 2000, Fall 2000, Spring 2001, Summer 2001
Unfortunately after entering the data nothing changes. If I update a different cell in the array (e.g. Fall 2001), I end up getting the result I expected in the previous step but not the new change. The UDF continues to be one step behind after each calculation.
Please note that as I stated earlier, adding "Application.Volatile" has no affect on the result of the UDF.
Code:
Public Function MultiCat( _
ByRef rRng As Excel.Range, _
Optional ByVal sDelim As String = "") _
As String
Application.Volatile
Dim rCell As Range
For Each rCell In rRng
MultiCat = MultiCat & sDelim & rCell.Text
Next rCell
MultiCat = Mid(MultiCat, Len(sDelim) + 1)
End Function
I think that's everything. Let me know if I'm missing any key information.
Thanks,
Hal
Windows XP
Excel 2007