Hi All,
I am constantly on a daily basis having to prepare data for SQL in excel so was wondering if there is an automatic way to add quotes, commas, transpose and select the transposed rows which i could simply paste into SQL.
Here's what I do:
1. I paste all my data in column B1 onwards
2. Add quotes A1 and C1
3. Add commas in D1
4. Concatenate in E1
5. Copy down the formula to all the rows of data
6. Copy column of data in E and paste values in F
7. Select all the values in F and Transpose into rows from cell G2 onwards.
Since I do this very often, is there a better way using a macro such that I can simply paste the column of data in B1 each time and run the macro so that it does the above steps without all the manual work involved?
Thanks for any assistance towards this manual effort.
I am constantly on a daily basis having to prepare data for SQL in excel so was wondering if there is an automatic way to add quotes, commas, transpose and select the transposed rows which i could simply paste into SQL.
Here's what I do:
1. I paste all my data in column B1 onwards
2. Add quotes A1 and C1
3. Add commas in D1
4. Concatenate in E1
5. Copy down the formula to all the rows of data
6. Copy column of data in E and paste values in F
7. Select all the values in F and Transpose into rows from cell G2 onwards.
Since I do this very often, is there a better way using a macro such that I can simply paste the column of data in B1 each time and run the macro so that it does the above steps without all the manual work involved?
Thanks for any assistance towards this manual effort.