Hey again,
I modified an UDF I found somewhere so it works for me, the problem is that it's so CPU intensive that just using it once makes excel work for 3-6 seconds when I edit any cell.
All it does is look at a column and copy text when a criteria is met on a different column and bunch the matches together. It goes like this:
Public Function ConcatIf(ConcatRange As Range, PID As Integer) As String
Dim rng As Range
For Each rng In ConcatRange
If rng.Offset(0, -11).Value = PID Then
ConcatIf = ConcatIf & rng.Value
End If
Next rng
End Function
Is this just the way it goes when working with strings or can something be done?
edit: I don't know that it matters, but only 9 rows contain values so far of the ~400 rows at the moment (but it's growing).
I modified an UDF I found somewhere so it works for me, the problem is that it's so CPU intensive that just using it once makes excel work for 3-6 seconds when I edit any cell.
All it does is look at a column and copy text when a criteria is met on a different column and bunch the matches together. It goes like this:
Public Function ConcatIf(ConcatRange As Range, PID As Integer) As String
Dim rng As Range
For Each rng In ConcatRange
If rng.Offset(0, -11).Value = PID Then
ConcatIf = ConcatIf & rng.Value
End If
Next rng
End Function
Is this just the way it goes when working with strings or can something be done?
edit: I don't know that it matters, but only 9 rows contain values so far of the ~400 rows at the moment (but it's growing).
Last edited: