Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Automatically Combine Cell Contents and Delete Rows

If someone could help me, I'd greatly appreciate it!

I have an Excel document that contains responses to a number of different questions on an application. The responses to every question for every applicant are in column A. In each cell the response is preceded by a unique variable that identifies the question to which the applicant is responding. For example, first_name: precedes the applicants first name, and the contents of a cell containing an applicant's response to a question asking his first name might be "first_name: John".

Whenever an applicant types his or her response into a text field and presses the return key to begin typing on a new line, a row is added to the output Excel document. So, if someone types some amount of text, presses the return key twice, and types some additional text, the response is spread across three rows in column A. (The unique variable precedes only the text in the first row, not all of the rows across which the response is spread.)

I need to format the spreadsheet in a way that the responses are not contained in more than one cell. So, I presume that I need a macro that can go through the document, identify when there are too many rows between variables (this occurs when a response is spread across two or more rows), combine responses that are contained in more than one cell, and delete any additional rows. Because I have many, many questions and many, many applications, it is not something that I can manually do.

What I have: (the numbers on the left-hand side represent rows)
1 variable1: response1
2 variable2: response2
3 variable3: response3
4
5 response3
6 variable4: response4

What I need:
1 variable1: response1
2 variable2: response2
3 variable3: response3 response3
4 variable4: response4

I would greatly, GREATLY appreciate it if someone could help me!

Jim
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I conditionally delete rows based on cell contents? John Chan Excel Worksheet Functions 3 May 17th 23 03:45 AM
Need excel copy a row and automatically insert new rows based on a cell contents paulmm New Users to Excel 0 March 26th 12 12:52 AM
combine contents of multiple rows in one row Rohit Excel Discussion (Misc queries) 1 July 14th 08 10:22 PM
How can I combine cell contents? Storm Excel Discussion (Misc queries) 1 April 13th 07 11:23 PM
How to combine data and delete rows PARSguy Excel Programming 1 July 21st 06 11:31 PM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"