PC Review


Reply
Thread Tools Rate Thread

converting column of text to text box for repetitive records

 
 
Clark Mobley
Guest
Posts: n/a
 
      14th Sep 2004
Hi,
I have a spreadsheet which contains employee information including job
skills. My problem is that each skill (cook,candlemaker, etc.)creates a new
row for that employee, duplicating fields that don't change, name, ss#,etc
with the only new info in the row being the skill
Like this:
Jane doe,123456789,555-555-5555,cook
Jane doe,123456789,555-555-5555,candlemaker
What I want is 1 row for each employee with the last column containing all
the skills in a text box or separated by commas. Is there an easy way to do
this in Excel? Or even Access?
Thanks, Clark


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.762 / Virus Database: 510 - Release Date: 9/13/04


 
Reply With Quote
 
 
 
 
Clark Mobley
Guest
Posts: n/a
 
      14th Sep 2004
To clarify, I want to convert all skills listed in the skill column for each
employee to one cell in that row:
|Jane doe |123456789 | 555-555-5555 | candlemaker, cook |
"Clark Mobley" <(E-Mail Removed)> wrote in message
news:kVG1d.131382$(E-Mail Removed)...
> Hi,
> I have a spreadsheet which contains employee information including job
> skills. My problem is that each skill (cook,candlemaker, etc.)creates a

new
> row for that employee, duplicating fields that don't change, name, ss#,etc
> with the only new info in the row being the skill
> Like this:
> Jane doe,123456789,555-555-5555,cook
> Jane doe,123456789,555-555-5555,candlemaker
> What I want is 1 row for each employee with the last column containing all
> the skills in a text box or separated by commas. Is there an easy way to

do
> this in Excel? Or even Access?
> Thanks, Clark
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.762 / Virus Database: 510 - Release Date: 9/13/04
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.762 / Virus Database: 510 - Release Date: 9/13/04


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      14th Sep 2004
One way is with a little macro:

Option Explicit
Sub testme01()

Dim FirstRow As Long
Dim LastRow As Long
Dim iRow As Long
Dim wks As Worksheet

Set wks = Worksheets("sheet1")

With wks
FirstRow = 2 'headers??
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row

For iRow = LastRow To FirstRow + 1 Step -1
If .Cells(iRow, "B").Value = .Cells(iRow - 1, "B").Value Then
.Cells(iRow - 1, "D").Value _
= .Cells(iRow - 1, "D").Value & "," _
& .Cells(iRow, "D").Value
.Rows(iRow).Delete
End If
Next iRow
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

But run this against a copy of your worksheet--it destroys the duplicated rows
when it copies the info to the previous row.

And it also assumes that your data is grouped by SSN (a nice unique key). If
your data isn't sorted/grouped, sort it first.

And I assumed you had headers in row 1. Either change the firstrow variable or
insert a header row.




Clark Mobley wrote:
>
> Hi,
> I have a spreadsheet which contains employee information including job
> skills. My problem is that each skill (cook,candlemaker, etc.)creates a new
> row for that employee, duplicating fields that don't change, name, ss#,etc
> with the only new info in the row being the skill
> Like this:
> Jane doe,123456789,555-555-5555,cook
> Jane doe,123456789,555-555-5555,candlemaker
> What I want is 1 row for each employee with the last column containing all
> the skills in a text box or separated by commas. Is there an easy way to do
> this in Excel? Or even Access?
> Thanks, Clark
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.762 / Virus Database: 510 - Release Date: 9/13/04


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: converting a text column to a number column & removing the ' RagDyeR Microsoft Excel Worksheet Functions 0 21st Aug 2009 05:00 PM
RE: converting a text column to a number column & removing the ' Jacob Skaria Microsoft Excel Worksheet Functions 0 21st Aug 2009 03:50 PM
Converting records into a text string =?Utf-8?B?RWxpIHRoZSBJY2VtYW4=?= Microsoft Access Queries 5 3rd May 2006 09:55 PM
Converting text in one column to four columns =?Utf-8?B?RXJuaWUgU2Vyc2Vu?= Microsoft Access 1 19th Apr 2005 09:07 PM
converting column of text to text box for repetitive records bilboda - ExcelForums.com Microsoft Excel Misc 3 15th Sep 2004 12:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:32 AM.