mtrilce
11-25-2016, 11:40 AM
Dear Friends
I have "concatena" macro that works great in an excel workbook but does not work in another. The modules are the same and in both cases macros are enabled ... Why does this happen?
Function Concatena(Rango As Range)
Dim Concat As String
For Each Celda In Rango.Cells
If Celda = "" Then GoTo Salto
Concat = Concat & ", " & Celda.Value
Salto:
Next Celda
Concat = Right(Concat, Len(Concat) - 2)
Concatena = Concat
End Function
I have "concatena" macro that works great in an excel workbook but does not work in another. The modules are the same and in both cases macros are enabled ... Why does this happen?
Function Concatena(Rango As Range)
Dim Concat As String
For Each Celda In Rango.Cells
If Celda = "" Then GoTo Salto
Concat = Concat & ", " & Celda.Value
Salto:
Next Celda
Concat = Right(Concat, Len(Concat) - 2)
Concatena = Concat
End Function