Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel concatenate duplicate rows

Hi,

I get a report from Dell OMSA that list all my dell servers and the hardware
and firmware versions. The report lists each server in a row with its
attributes to the right. So far, so good. If the server has multiple NIC's it
will create a row for each NIC. So I can have multiple entries for each
server, only differing in the NIC column. What I want is one row per server.
If there are multiple NIC's or other hardware, I want that information tacked
onto the end of the row. And duplicate information ignored.

Sample Rows

Server1,Serial#,OS,BIOS, Ver, NIC1
Server1,Serial#,OS,BIOS, Ver, NIC2
Server1,Serial#,OS,BIOS, Ver, NIC3

Desired output

Server1,Serial#,OS,BIOS, Ver, NIC1,NIC2,NIC3, etc

Any ideas?

Mike


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Excel concatenate duplicate rows

The simplest form of this assumes that:
your imported list is in a1:a?
you have a list in c1:c?
Server1,Serial#,OS,BIOS, Ver
Server2,Serial#,OS,BIOS, Ver

You have no more than 9 servers

Sub GetNICS()
x = Cells(Rows.Count, "a").End(xlUp).Row
For Each c In Range("a1:a" & x)
x = Mid(c, 7, 1)
Cells(x, "c") = Cells(x, "c") & Right(Cells(c.Row, 1), 6)
Next
End Sub

--
Don Guillett
SalesAid Software

"MFelkins" wrote in message
...
Hi,

Any chance I could get a sample of the code that would do this?

Mike

"Don Guillett" wrote:

Doable with a list (a macro can make it) and then a macro to loop thru
and
append to the list. Easier to code
if less than 10. You could do it either way show below.

Server1,Serial#,OS,BIOS, Ver, NIC1,NIC2,NIC3
Server1,Serial#,OS,BIOS, Ver, NIC1,2,3

--
Don Guillett
SalesAid Software

"MFelkins" wrote in message
...
Hi,

I get a report from Dell OMSA that list all my dell servers and the
hardware
and firmware versions. The report lists each server in a row with its
attributes to the right. So far, so good. If the server has multiple
NIC's
it
will create a row for each NIC. So I can have multiple entries for each
server, only differing in the NIC column. What I want is one row per
server.
If there are multiple NIC's or other hardware, I want that information
tacked
onto the end of the row. And duplicate information ignored.

Sample Rows

Server1,Serial#,OS,BIOS, Ver, NIC1
Server1,Serial#,OS,BIOS, Ver, NIC2
Server1,Serial#,OS,BIOS, Ver, NIC3

Desired output

Server1,Serial#,OS,BIOS, Ver, NIC1,NIC2,NIC3, etc

Any ideas?

Mike







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel concatenate duplicate rows

Thanks, I'll give it a try

Mike

"Don Guillett" wrote:

The simplest form of this assumes that:
your imported list is in a1:a?
you have a list in c1:c?
Server1,Serial#,OS,BIOS, Ver
Server2,Serial#,OS,BIOS, Ver

You have no more than 9 servers

Sub GetNICS()
x = Cells(Rows.Count, "a").End(xlUp).Row
For Each c In Range("a1:a" & x)
x = Mid(c, 7, 1)
Cells(x, "c") = Cells(x, "c") & Right(Cells(c.Row, 1), 6)
Next
End Sub

--
Don Guillett
SalesAid Software

"MFelkins" wrote in message
...
Hi,

Any chance I could get a sample of the code that would do this?

Mike

"Don Guillett" wrote:

Doable with a list (a macro can make it) and then a macro to loop thru
and
append to the list. Easier to code
if less than 10. You could do it either way show below.

Server1,Serial#,OS,BIOS, Ver, NIC1,NIC2,NIC3
Server1,Serial#,OS,BIOS, Ver, NIC1,2,3
--
Don Guillett
SalesAid Software

"MFelkins" wrote in message
...
Hi,

I get a report from Dell OMSA that list all my dell servers and the
hardware
and firmware versions. The report lists each server in a row with its
attributes to the right. So far, so good. If the server has multiple
NIC's
it
will create a row for each NIC. So I can have multiple entries for each
server, only differing in the NIC column. What I want is one row per
server.
If there are multiple NIC's or other hardware, I want that information
tacked
onto the end of the row. And duplicate information ignored.

Sample Rows

Server1,Serial#,OS,BIOS, Ver, NIC1
Server1,Serial#,OS,BIOS, Ver, NIC2
Server1,Serial#,OS,BIOS, Ver, NIC3

Desired output

Server1,Serial#,OS,BIOS, Ver, NIC1,NIC2,NIC3, etc

Any ideas?

Mike








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
Delete Duplicate rows in an Excel list Jmh3115 Excel Discussion (Misc queries) 2 March 7th 09 06:05 AM
How to concatenate many rows in Excel Christina Haney Excel Worksheet Functions 3 January 17th 09 02:10 PM
No duplicate Concatenate output kyoshirou Excel Discussion (Misc queries) 2 June 5th 07 05:10 PM
How to delete duplicate rows in Excel 2000? PAL@Emory Excel Discussion (Misc queries) 1 January 28th 05 03:08 PM
Showing Duplicate rows in excel Jagz Excel Discussion (Misc queries) 3 January 1st 05 10:57 AM


All times are GMT +1. The time now is 08:01 AM.

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"