Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Making a list of discrete numbers (names?) and occurences of each

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
partsman_ba - 21 Jun 2007 23:47 GMT
Here's what I have:

A spreadsheet sent to me with a list of filter part numbers, with each
vehicle having it's own row and each type of filter (air, oil, etc) having
it's own column. I would like to create from this data a sorted list of each
different filter part number, along with a count of how many times that part
number is on the sheet. Part numbers contain both numeric and alpha
characters in some cases. It seems like something not so hard to do, but I've
been bashing my head for some time!
partsman_ba - 22 Jun 2007 00:05 GMT
Ideally, I would like it to automatically update - if I put in a new filter
number, it would be added to the sorted list with an occurence of 1, or if I
add an already used filter to a new vehicle, it will add another occurence to
the list. Am I asking too much?

> Here's what I have:
>
[quoted text clipped - 5 lines]
> characters in some cases. It seems like something not so hard to do, but I've
> been bashing my head for some time!
Roger Govier - 22 Jun 2007 00:57 GMT
Hi

Provided each of your columns has a header title in row 1, it sounds an
ideal candidate for a Pivot Table report.
Take a look at Debra Dalgleish's site  and scroll down to Pivot Tables
for assistance on how to set one up.
http://www.contextures.com/tiptech.html

or Mike Alexander's site
http://www.datapigtechnologies.com/flashfiles/pivot1.html
Signature

Regards

Roger Govier

> Ideally, I would like it to automatically update - if I put in a new
> filter
[quoted text clipped - 18 lines]
>> but I've
>> been bashing my head for some time!
partsman_ba - 22 Jun 2007 22:06 GMT
Roger,

Here's a small piece of what the top looks like:

                4J FILTERS           
                           
UNIT #    YR/MAKE                   LUBE        AIR        FUEL   
                                                       PRIMARY SECONDARY    INNER   
10    07 BLUEBIRD    7182        6861        3231 or 3411
11    07 BLUEBIRD    7182        6861        3231 or 3411
12    07 BLUEBIRD    7182        6861        3231 or 3411
13    07 BLUEBIRD    7182        6861        3231 or 3411
14    08 BLUEBIRD    7182        6861        3231 or 3411
15    08 BLUEBIRD    7182        6861        3231 or 3411
20    03 BLUEBIRD    7182        6500        3231 or 3411
21    06 BLUEBIRD    1791XE        6861    6862    3231 or 3411

So, not all fields are full, and headings are split - can it still work?

> Hi
>
[quoted text clipped - 28 lines]
> >> but I've
> >> been bashing my head for some time!
partsman_ba - 22 Jun 2007 22:55 GMT
What I would like on, say, Sheet2 would be:

1791XE                  1
3231 or 3411          8
6500                      1
6861                      7
6862                      1
7182                      7

and if I add a new number to Sheet1, it shows up on my list

>  Roger,
>
[quoted text clipped - 47 lines]
> > >> but I've
> > >> been bashing my head for some time!
Roger Govier - 24 Jun 2007 11:42 GMT
Hi

For a Pivot Table to work, each column has to have a unique heading in
the first row.
It does not matter if there is data in every column of each row.

From your posting, it is difficult to see your layout.

Signature

Regards

Roger Govier

> What I would like on, say, Sheet2 would be:
>
[quoted text clipped - 70 lines]
>> > >> but I've
>> > >> been bashing my head for some time!
Dave Peterson - 24 Jun 2007 13:16 GMT
Although, I think it's a good idea for each field to have a unique header, all
that's required is that each field have a header (non-empty cell).

> Hi
>
[quoted text clipped - 88 lines]
> >> > >> but I've
> >> > >> been bashing my head for some time!

Signature

Dave Peterson

Max - 26 Jun 2007 04:07 GMT
One alternative using non-array formulas which automates the extraction of
the uniques list from 4 source cols and the corresponding counts of the
uniques ..

Illustration in this sample construct:
http://www.savefile.com/files/841298
Multicol merge n uniques extract n count.xls

Source data assumed in cols A to F, data from row5 down
where col C = Lube data, col D = air-primary data,
col E = air-secondary data, col F = fuel-inner data

Using 4 adjacent cols to the right, cols G to J

In G5:
=OFFSET(C$5,INT((ROWS($1:1)-1)/4),MOD(ROWS($1:1)-1,4))
Copy down to cover the max expected extent of aggregated data in the 4
source cols C to F. If you expect source data per col to span up to say 100
rows down, then copy down by a total of 400 rows (4 cols x 100 rows = 400
rows). Col G functions to merge the contents of cols C to F into a single
col. Empty source cells will be returned as zeros.  

In H5:
=IF(G5=0,"",IF(COUNTIF(G$5:G5,G5)>1,"",ROW()))
Leave H1:H4 blank. This is a criteria col to ignore the zeros and flag the
unique items extracted in col G.

In I5:
=IF(ROWS($1:1)>COUNT(H:H),"",INDEX(G:G,SMALL(H:H,ROWS($1:1))))

In J5:
=IF(I5="","",COUNTIF(G:G,I5))
Select H5:J5, fill down to the same extent as for col G. Hide away cols G &
H. Col I will return the list of unique items from cols C to F, while col J
returns the counts of these unique items. All results will be neatly bunched
at the top.

You could then just do a simple copy n paste special as values for cols I &
J elsewhere, and use Data > Sort menu to sort by the uniques col.
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

> What I would like on, say, Sheet2 would be:
>
[quoted text clipped - 58 lines]
> > > >> but I've
> > > >> been bashing my head for some time!
partsman_ba - 27 Jun 2007 23:42 GMT
Thanks Max - exactly what I was looking for. Looks like the BASIC programming
I used to do on my TRS-80 Model I back in 1981!

> One alternative using non-array formulas which automates the extraction of
> the uniques list from 4 source cols and the corresponding counts of the
[quoted text clipped - 97 lines]
> > > > >> but I've
> > > > >> been bashing my head for some time!
Max - 28 Jun 2007 00:12 GMT
welcome, good to hear it worked for you.
Signature

Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

> Thanks Max - exactly what I was looking for. Looks like the BASIC
> programming
> I used to do on my TRS-80 Model I back in 1981!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.