Forum Discussion
jukhamil
Sep 28, 2021Brass Contributor
Can we extend the VBA classes?
I am considering that I would like a method that I can call on what's returned by the VBA Range object. Because I have comma-separated values in cells, I would like to index them like in a list - Cel...
Juliano-Petrukio
Sep 29, 2021Bronze Contributor
You can store what is in the cells into a variant variable considering the different delimiters (comma, etc.)
YourVariable=Split(ActiveCell.Value, ",")
Of course ActiveCell and comma as a delimiter is just a simple example.
Function UDFName(CellValue As Variant, _
Delimiter As String) As Variant
UDFName = Split(CellValue, Delimiter)
End Function