Hi All,
I create a multidimensioned array by splitting a file by crlf-s then splitting each elements in the resulted array by field separator, like this:
Sub splitFile()
Dim arrByCrLfs() As String
Dim arrByFields() As Variant
'by snb
Open "C:\vba\testgl_s.txt" For Input As #1
arrByCrLfs = Split(Input(LOF(1), #1), vbCrLf)
Close #1
ReDim arrByFields(UBound(arrByCrLfs))
For i = 3 To UBound(arrByCrLfs)
arrByFields(i) = Split(arrByCrLfs(i), "|")
Next i
I would like to get rid off some elements in the first array based on some criteria, e.g they are empty or they contains spaces only.
Is there any way to do on some efficient way?
Thanks
Bookmarks