Much simpler ( and faster !):
sn is a 0-dimensional array containing all 'rows' in the csv-file that contain the searched for textstring.![]()
sub snb() c00="D:\My documents\xyz\" c01=dir(c00 & "*.csv") do until c01="" open c00 & c01 for input as #1 sn=filter(split(Input(LOF(1),1),vbcrlf),"filtercriterion") close c01=Dir loop End Sub
You can even add the content of all csv files into 1 string before splitting and filtering.
Bookmarks