Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Multiple rows into one

I have an app. that can be used to generate an output file containing user
data. It is a five column file, with the first two columns containing
identical data for each user; specifically user-id and user name. The
remaining three columns contain unique data. For each occurrence of unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one row?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Multiple rows into one

How about posting a sample layout. Here is one I did a couple of days ago
where names in col a and data in col c. Put unique names in col D and string
in col E and sum in col F

Sub getscroresinonecell()
'get unique names for list
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(1, "d"), Cells(lr, "e")).ClearContents
Range("A1:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("D1"), Unique:=True
'find scores for each
dlr = Cells(Rows.Count, "d").End(xlUp).Row
For Each x In Range("d2:d" & dlr)
ms = ""
mss = 0
With Range("a1:a" & lr)
Set c = .Find(x)
If Not c Is Nothing Then
firstAddress = c.Address
Do
ms = ms & "," & c.Offset(, 2)
mss = mss + c.Offset(, 2)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Cells(x.Row, 5) = Right(ms, Len(ms) - 1)
Cells(x.Row, 6) = mss
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
I have an app. that can be used to generate an output file containing user
data. It is a five column file, with the first two columns containing
identical data for each user; specifically user-id and user name. The
remaining three columns contain unique data. For each occurrence of
unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one row?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Multiple rows into one

Don:

A sample of the file output:

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567
mpalmer Mark Palmer mpalmer cell Phone Number 5551234567
mpalmer Mark Palmer Office Phone Phone Number 5551234567
mpalmer Mark Palmer Text Messages SMS Cellphone 5551234567
mpalmer Mark Palmer Pager SMS Pager 5551234567
mpalmer Mark Palmer Home Phone Phone Number 5551234567





"Don Guillett" wrote:

How about posting a sample layout. Here is one I did a couple of days ago
where names in col a and data in col c. Put unique names in col D and string
in col E and sum in col F

Sub getscroresinonecell()
'get unique names for list
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(1, "d"), Cells(lr, "e")).ClearContents
Range("A1:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("D1"), Unique:=True
'find scores for each
dlr = Cells(Rows.Count, "d").End(xlUp).Row
For Each x In Range("d2:d" & dlr)
ms = ""
mss = 0
With Range("a1:a" & lr)
Set c = .Find(x)
If Not c Is Nothing Then
firstAddress = c.Address
Do
ms = ms & "," & c.Offset(, 2)
mss = mss + c.Offset(, 2)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Cells(x.Row, 5) = Right(ms, Len(ms) - 1)
Cells(x.Row, 6) = mss
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
I have an app. that can be used to generate an output file containing user
data. It is a five column file, with the first two columns containing
identical data for each user; specifically user-id and user name. The
remaining three columns contain unique data. For each occurrence of
unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one row?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Multiple rows into one

Andddddd, you want it to look like__________?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
Don:

A sample of the file output:

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567
mpalmer Mark Palmer mpalmer cell Phone Number 5551234567
mpalmer Mark Palmer Office Phone Phone Number 5551234567
mpalmer Mark Palmer Text Messages SMS Cellphone 5551234567
mpalmer Mark Palmer Pager SMS Pager 5551234567
mpalmer Mark Palmer Home Phone Phone Number 5551234567





"Don Guillett" wrote:

How about posting a sample layout. Here is one I did a couple of days ago
where names in col a and data in col c. Put unique names in col D and
string
in col E and sum in col F

Sub getscroresinonecell()
'get unique names for list
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(1, "d"), Cells(lr, "e")).ClearContents
Range("A1:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("D1"), Unique:=True
'find scores for each
dlr = Cells(Rows.Count, "d").End(xlUp).Row
For Each x In Range("d2:d" & dlr)
ms = ""
mss = 0
With Range("a1:a" & lr)
Set c = .Find(x)
If Not c Is Nothing Then
firstAddress = c.Address
Do
ms = ms & "," & c.Offset(, 2)
mss = mss + c.Offset(, 2)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Cells(x.Row, 5) = Right(ms, Len(ms) - 1)
Cells(x.Row, 6) = mss
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
I have an app. that can be used to generate an output file containing
user
data. It is a five column file, with the first two columns containing
identical data for each user; specifically user-id and user name. The
remaining three columns contain unique data. For each occurrence of
unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one row?




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Multiple rows into one

My apologies, Don, for not being more explicit in my request. I appreciate
the help. This window is not the best medium for my desired output, so let
me say I would like the following:

User-ID (mpalmer), User Name (Mark Palmer), Device 1 name (mpalmer text),
Device 1 type (SMS Cellphone), Device 1 Info(5551234567), Device 2 name,
Device 2 type, Device 2 info. etc. as a single row.

A possible obstacle may be that not every user has the same number of
devices, so the number of columns needed would vary.

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567 mpalmer cell
Phone Number 5551234567 office Phone Phone Number 5551234567 Text Messages
Pager SMS Pager 5551234567 Home Phone Phone Number 5551234567

"Don Guillett" wrote:

Andddddd, you want it to look like__________?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
Don:

A sample of the file output:

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567
mpalmer Mark Palmer mpalmer cell Phone Number 5551234567
mpalmer Mark Palmer Office Phone Phone Number 5551234567
mpalmer Mark Palmer Text Messages SMS Cellphone 5551234567
mpalmer Mark Palmer Pager SMS Pager 5551234567
mpalmer Mark Palmer Home Phone Phone Number 5551234567





"Don Guillett" wrote:

How about posting a sample layout. Here is one I did a couple of days ago
where names in col a and data in col c. Put unique names in col D and
string
in col E and sum in col F

Sub getscroresinonecell()
'get unique names for list
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(1, "d"), Cells(lr, "e")).ClearContents
Range("A1:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("D1"), Unique:=True
'find scores for each
dlr = Cells(Rows.Count, "d").End(xlUp).Row
For Each x In Range("d2:d" & dlr)
ms = ""
mss = 0
With Range("a1:a" & lr)
Set c = .Find(x)
If Not c Is Nothing Then
firstAddress = c.Address
Do
ms = ms & "," & c.Offset(, 2)
mss = mss + c.Offset(, 2)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Cells(x.Row, 5) = Right(ms, Len(ms) - 1)
Cells(x.Row, 6) = mss
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
I have an app. that can be used to generate an output file containing
user
data. It is a five column file, with the first two columns containing
identical data for each user; specifically user-id and user name. The
remaining three columns contain unique data. For each occurrence of
unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one row?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Multiple rows into one

It might be best to send a file to the address below along with snippets of
these messages.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
My apologies, Don, for not being more explicit in my request. I appreciate
the help. This window is not the best medium for my desired output, so
let
me say I would like the following:

User-ID (mpalmer), User Name (Mark Palmer), Device 1 name (mpalmer text),
Device 1 type (SMS Cellphone), Device 1 Info(5551234567), Device 2 name,
Device 2 type, Device 2 info. etc. as a single row.

A possible obstacle may be that not every user has the same number of
devices, so the number of columns needed would vary.

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567 mpalmer cell
Phone Number 5551234567 office Phone Phone Number 5551234567 Text
Messages
Pager SMS Pager 5551234567 Home Phone Phone Number 5551234567

"Don Guillett" wrote:

Andddddd, you want it to look like__________?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
Don:

A sample of the file output:

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567
mpalmer Mark Palmer mpalmer cell Phone Number 5551234567
mpalmer Mark Palmer Office Phone Phone Number 5551234567
mpalmer Mark Palmer Text Messages SMS Cellphone 5551234567
mpalmer Mark Palmer Pager SMS Pager 5551234567
mpalmer Mark Palmer Home Phone Phone Number 5551234567





"Don Guillett" wrote:

How about posting a sample layout. Here is one I did a couple of days
ago
where names in col a and data in col c. Put unique names in col D and
string
in col E and sum in col F

Sub getscroresinonecell()
'get unique names for list
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(1, "d"), Cells(lr, "e")).ClearContents
Range("A1:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("D1"), Unique:=True
'find scores for each
dlr = Cells(Rows.Count, "d").End(xlUp).Row
For Each x In Range("d2:d" & dlr)
ms = ""
mss = 0
With Range("a1:a" & lr)
Set c = .Find(x)
If Not c Is Nothing Then
firstAddress = c.Address
Do
ms = ms & "," & c.Offset(, 2)
mss = mss + c.Offset(, 2)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Cells(x.Row, 5) = Right(ms, Len(ms) - 1)
Cells(x.Row, 6) = mss
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
I have an app. that can be used to generate an output file containing
user
data. It is a five column file, with the first two columns
containing
identical data for each user; specifically user-id and user name.
The
remaining three columns contain unique data. For each occurrence of
unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one row?





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Multiple rows into one



--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
It might be best to send a file to the address below along with snippets
of these messages.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
My apologies, Don, for not being more explicit in my request. I
appreciate
the help. This window is not the best medium for my desired output, so
let
me say I would like the following:

User-ID (mpalmer), User Name (Mark Palmer), Device 1 name (mpalmer text),
Device 1 type (SMS Cellphone), Device 1 Info(5551234567), Device 2 name,
Device 2 type, Device 2 info. etc. as a single row.

A possible obstacle may be that not every user has the same number of
devices, so the number of columns needed would vary.

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567 mpalmer cell
Phone Number 5551234567 office Phone Phone Number 5551234567 Text
Messages
Pager SMS Pager 5551234567 Home Phone Phone Number 5551234567

"Don Guillett" wrote:

Andddddd, you want it to look like__________?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
Don:

A sample of the file output:

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567
mpalmer Mark Palmer mpalmer cell Phone Number 5551234567
mpalmer Mark Palmer Office Phone Phone Number 5551234567
mpalmer Mark Palmer Text Messages SMS Cellphone 5551234567
mpalmer Mark Palmer Pager SMS Pager
5551234567
mpalmer Mark Palmer Home Phone Phone Number 5551234567





"Don Guillett" wrote:

How about posting a sample layout. Here is one I did a couple of days
ago
where names in col a and data in col c. Put unique names in col D and
string
in col E and sum in col F

Sub getscroresinonecell()
'get unique names for list
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(1, "d"), Cells(lr, "e")).ClearContents
Range("A1:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("D1"), Unique:=True
'find scores for each
dlr = Cells(Rows.Count, "d").End(xlUp).Row
For Each x In Range("d2:d" & dlr)
ms = ""
mss = 0
With Range("a1:a" & lr)
Set c = .Find(x)
If Not c Is Nothing Then
firstAddress = c.Address
Do
ms = ms & "," & c.Offset(, 2)
mss = mss + c.Offset(, 2)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Cells(x.Row, 5) = Right(ms, Len(ms) - 1)
Cells(x.Row, 6) = mss
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
I have an app. that can be used to generate an output file
containing
user
data. It is a five column file, with the first two columns
containing
identical data for each user; specifically user-id and user name.
The
remaining three columns contain unique data. For each occurrence
of
unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one
row?






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Multiple rows into one

I would use datafilteradvanced filterunique to make an owner list. I
would then use FINDNEXT macro to extract and have it line up under each
category if there is an entry in the category or nothing if not.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
It might be best to send a file to the address below along with snippets
of these messages.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
My apologies, Don, for not being more explicit in my request. I
appreciate
the help. This window is not the best medium for my desired output, so
let
me say I would like the following:

User-ID (mpalmer), User Name (Mark Palmer), Device 1 name (mpalmer text),
Device 1 type (SMS Cellphone), Device 1 Info(5551234567), Device 2 name,
Device 2 type, Device 2 info. etc. as a single row.

A possible obstacle may be that not every user has the same number of
devices, so the number of columns needed would vary.

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567 mpalmer cell
Phone Number 5551234567 office Phone Phone Number 5551234567 Text
Messages
Pager SMS Pager 5551234567 Home Phone Phone Number 5551234567

"Don Guillett" wrote:

Andddddd, you want it to look like__________?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
Don:

A sample of the file output:

mpalmer Mark Palmer mpalmer text SMS Cellphone 5551234567
mpalmer Mark Palmer mpalmer cell Phone Number 5551234567
mpalmer Mark Palmer Office Phone Phone Number 5551234567
mpalmer Mark Palmer Text Messages SMS Cellphone 5551234567
mpalmer Mark Palmer Pager SMS Pager
5551234567
mpalmer Mark Palmer Home Phone Phone Number 5551234567





"Don Guillett" wrote:

How about posting a sample layout. Here is one I did a couple of days
ago
where names in col a and data in col c. Put unique names in col D and
string
in col E and sum in col F

Sub getscroresinonecell()
'get unique names for list
lr = Cells(Rows.Count, "a").End(xlUp).Row
Range(Cells(1, "d"), Cells(lr, "e")).ClearContents
Range("A1:A" & lr).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("D1"), Unique:=True
'find scores for each
dlr = Cells(Rows.Count, "d").End(xlUp).Row
For Each x In Range("d2:d" & dlr)
ms = ""
mss = 0
With Range("a1:a" & lr)
Set c = .Find(x)
If Not c Is Nothing Then
firstAddress = c.Address
Do
ms = ms & "," & c.Offset(, 2)
mss = mss + c.Offset(, 2)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Cells(x.Row, 5) = Right(ms, Len(ms) - 1)
Cells(x.Row, 6) = mss
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MarkP" wrote in message
...
I have an app. that can be used to generate an output file
containing
user
data. It is a five column file, with the first two columns
containing
identical data for each user; specifically user-id and user name.
The
remaining three columns contain unique data. For each occurrence
of
unique
data for a particular user, a new row is generated.

Is there a way to combine the multiple rows for a user into one
row?






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
can i wrap rows to form multiple rows per row to fit on 1 sheet? Dave Excel Discussion (Misc queries) 2 October 9th 12 04:53 PM
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents BenS Excel Discussion (Misc queries) 3 June 29th 07 12:20 AM
Excel Convert Multiple Rows into Multiple Columns [email protected] Excel Worksheet Functions 1 June 28th 07 05:20 AM
sort multiple rows without affecting others rows Nitya Excel Discussion (Misc queries) 0 August 10th 06 01:59 PM
Copying multiple rows to other worksheets (but amount of rows varies) - How? David Smithz Excel Discussion (Misc queries) 1 June 18th 06 04:31 PM


All times are GMT +1. The time now is 01:40 PM.

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

About Us

"It's about Microsoft Excel"