I want to extract data from MS Access database to MS Excel using VBA.
I know the code to extract but facing issues manipulating the column.
I want to extract string before first comma, and then string after second and before third comma, and then string after third comma.
As an example. Let's say I have one column called fruits and it has data as
Banana,Apple,Orange,Grapes
I want to create four columns which will have Banana on first, Apple on second, Orange on third and Grapes on fourth column.
Below is what I tried for first column.
SQL = "SELECT SUBSTRING(Fruits,0,CHARINDEX(',',Fruits) as column1 from tablename"