vba - Split string data into multiple columns access -
i have column multiple service codes looking split different columns tallying purposes in access. example of 1 line looks this:
$= ** ;= aa ac bb1 ca5 cc4 cc5 cc6 cc7 cc9 cd1 ci cr d0 d1 d2 d3 d9 f> f> fa7 fa9 fb1 ha6 kj p* p? pw pz qg v4 wj 1d 2o
the goal create aa column, ac column etc tally service code being used row. each line of service codes uniquely different others. thoughts? i'm kinda familiar macros , sql queries too.
here's have far:
sub splitcolumn() dim rst dao.recordset dim arr() string dim integer set rst = currentdb.openrecordset("select * _raw") arr = split(rst("serv cde string"), ",") = 0 ubound(arr) '/do here next end sub
thank you,
rebecca
the separator seems wrong:
sub splitcolumn() dim rst dao.recordset dim arr variant dim integer set rst = currentdb.openrecordset("select * _raw") arr = split(rst("serv cde string").value, " ") = lbound(arr) ubound(arr) '/do here debug.print i, arr(i) next set rst = nothing end sub
Comments
Post a Comment