Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving Rows to Create (Sort of) Columns

Status
Not open for further replies.

Kleptican

MIS
Feb 23, 2006
26
US
I have a spreadsheet that looks like this:
Social - Name - Address - DOB
SSN1 Name1 Address1 DOB1
SSN2 Name2 Address2 DOB2
SSN3 Name3 Address3 DOB3
SSN4 Name4 Address4 DOB4

What I would like to do is to take rows and put them on one line. So, for example, if I saw that SSN1, SSN2, and SSN3 were related (in terms of the info on the spreadsheet), I'd want to highlight those range of cells and create something like this:

Social - Name - Address - DOB
SSN1 Name1 Address1 DOB1 SSN2 Name2 Address2 DOB2 SSN3 Name3 Address3 DOB3
SSN4 Name4 Address4 DOB4

Other than writing a VBA script and manually doing one record at a time, is there a way to highlight a range of cells, and paste them so they appear on one row?

Thanks for the help.
 
For a specific range, there is Copy | PasteSpecial | Transpose. Not sure if that would help you here or not actually. This sounds like it should be in a database though. If you *want* to do this via VBA, you'll have to point out exactly how those records are 'related'.

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
This information was created through an export from a database and since I had the information in excel format I was just wondering if there was an excel trick to accomplish what I wanted to do. I've tried the transpose but don't get the right format I'm looking for. ;)

It seems like I'll have to modify the export process then from the database to get the desired format.
 
If you could do that it'd be better. Trying to reformat it in Excel is the hard way to go here.

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top