UDF7: Split Up - Convert a String into an array (excel VBA) [advanced]

preview_player
Показать описание


A function that converts a string into an array based on a separated characters.
Рекомендации по теме
Комментарии
Автор

I am a rookie for excel vba coding. I am using your Splitup function in a macro I am working on. What I understand is to split all values and generate them in different cell, one has to drag formula in cells. Can I add some conditional steps in a macro so that function is automatically pasted in cells depending on number of strings and all values are generated? E.g if there are 5 strings. Formula is applied in cell A1. It gets dragged till cell E1 (5 strings - 5 cells). Can we use countstring function you used in this video? Please guide me.

chiragbharucha
Автор

It's amazing idea. Thank you so much:)

mustafae
Автор

nice approach :)
if you used the VBA built-in "split" function life would've been  much easier tho ;)

livio
Автор

Dont need all of this. The code above do the job

Function Splitup(Mystring As String, step As String) As Variant

Dim a() As String
a() = Split(Mystring, step)
Splitup = a()

End Function

Carlos-juwi
Автор

When I try to apply this function, it gives "#NAME?" in the cell. What can be the reason?

chiragbharucha
welcome to shbcf.ru