Convert data in rows to column headings?

timorrill

Well-known Member
Joined
Sep 20, 2006
Messages
528
I've been out of the Access loop for a while, and have a quick question.

The data I have is in the following format:

ID Date Total
1234 01/01/1985 524.98
1234 01/01/1986 564.12
1234 01/01/1987 112.25
2346 01/01/1985 475.56
8476 01/01/1985 789.52
8476 01/01/1986 445.55
8476 01/01/1987 123.45
2946 01/01/1985 123.85
1234 01/01/1988 987.65
9927 01/01/1985 127.54
9927 01/01/1986 445.85

I want to run a query, or set up a new table, that translates the data into this format:

ID 01/01/1985 01/01/1986 01/01/1987 01/01/1988 ....
1234 524.98 564.12 112.25 987.65 ....
2346 ...
8476 ...
2946 ...
9927 ...

Any suggestions?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I think you are wanting a Cross Tab query. You have three options here.

1. Easy Option:
You can export the information to excel and then copy the information, open a blank spreadsheet, choose "Paste Special" and click the transpose button and it converts the data.

2. Other Option:
Build A report in Access with all your column headings going down the left side:
Date:
ID:
Total:


3. Click, New Query, Choose "Crosstab Query". This only allows you to have three columns.


Keep in mind for options 1 & 2 you have a maximum of 256 columns so if you have more rows of data than 256 then you are going to get an error.

I hope this helps.

:cool:
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,198
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top