help with HUGE file building list

S

srosetti

What I need to do is build a list of items, but seperated with
commas..

So..I have built this file to have a Brand, Model, Part criteria.
There is 53k or so entries or rows.

What I need to do is.. Sort each Part Number probably around 1200
Parts which will show me each Brand that takes that part in a list. I
need some sort of automation to create this list of Brands, but have
them seperated by commas.. For example..

These Part Numbers in Column C fit These Models in B and Brands in
Column A
Col-C P/N Col-B Model number Col-A Brand
1683 A altima
1683 B altima
1683 C altima
1683 D altima
1683 E snoma
1683 F snoma
1683 G snoma
1683 H snoma
1683 I tscny

As you can see there is some redundancy in the Brand Column on this
Part number.
What I need to do is have a final ouptut in a new colum look like
this.. 1683,altima,snoma,tscny


Any ideas on how to achieve this? I think Excel can handle it, but
I'm not sure. Please advise.
 
S

srosetti

Wow, That's really some bada$$ code. Only a few have more than 255
models per part number. I'm unfortunately using Excel 2003. I went
ahead and saved the file as a CSV and opened in wordpad to see the
commas.. Many of the lines end like this one

56S23,knmore,kmart,outgmt,,,,

maybe we can just have excel add the commas so we don't have to delete
all those extra commas later.


I can't tell you how much time this has saved me, but maybe a month.


Thanks
 
S

srosetti

code works wonderfuly.. only thing I noticed is that when in excel it
doesn't put the comma in if it only has one brand entry, but when I
save it as csv it's all good. This is a huge huge help.


Thanks a ton,

Steve
 
J

Joel

Small change

from
.Range("A" & NewRow) = PartNo
OldPartNo = PartNo
.Range("B" & NewRow) = Model
OldModel = Model
to
.Range("A" & NewRow) = PartNo & "," & Model
OldPartNo = PartNo
OldModel = Model
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top