how to convert rows to column in Access

K

kirtagrawal

I have one column with 200 rows and would like to convert it into 200
columns with one row.
e.g. sample data is like:

Column 1
abc
cde
efg
ghi
ijk
etc

would like to convert this data into:

col 1 col 2 col 3 col 4 col 5 col 6
abc cde efg ghi ijk etc

any help is highly appreciated.
 
D

Duane Hookom

The easiest method would be to copy and the paste into Excel where you can
paste "Transpose" a range. If you want to stay in Access, I would add an
AutoNumber "ID" field so each record will be numbered 1-200. Then create a
crosstab query with:

Field: Title:" "
Totals: Group By
Crosstab: Row Heading

Field: ColHead: "Col" & Right(" " & [ID], 3)
Totals: Group By
Crosstab: Column Heading

Field: TheValue: [Column 1]
Totals: First
Crosstab: Value
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top