A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count incidences of part numbers



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2004, 10:56 PM
jmdaniel
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

I have a file downloaded daily from Oracle that lists our critical shortages by part number. These part numbers can have multiple incidences of shortages. My task is to sort the file by part number, then establish the number of different part numbers that have shortages reported. For example, part number 123-000 has 3 lines, or incidences, of shortages. This would count as one. Part number 123-001 has one line, or incident, of shortage, and this would also count as one. I scrolled through the list of solutions under "Count", and didn't have any luck. Help is obviously appreciated.

Jeff
  #2  
Old March 4th, 2004, 11:13 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

Hi
so you want to count the number of unique part numbers. If your part
numbers are stored in column A try the following formula:
=SUMPRODUCT(1/COUNTIF(A1:A1000,A1:A1000&""))

--
Regards
Frank Kabel
Frankfurt, Germany
"jmdaniel" schrieb im Newsbeitrag
...
I have a file downloaded daily from Oracle that lists our critical

shortages by part number. These part numbers can have multiple
incidences of shortages. My task is to sort the file by part number,
then establish the number of different part numbers that have shortages
reported. For example, part number 123-000 has 3 lines, or incidences,
of shortages. This would count as one. Part number 123-001 has one
line, or incident, of shortage, and this would also count as one. I
scrolled through the list of solutions under "Count", and didn't have
any luck. Help is obviously appreciated.

Jeff


  #3  
Old March 4th, 2004, 11:15 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

Hi Jeff,

You could put al of the part numbers in a column, say A, on another sheet,
and add this formula to B1
=MIN(1,COUNTIF(Sheet1!$A$1:$A$100,A1))
and copy down column B
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jmdaniel" wrote in message
...
I have a file downloaded daily from Oracle that lists our critical

shortages by part number. These part numbers can have multiple incidences of
shortages. My task is to sort the file by part number, then establish the
number of different part numbers that have shortages reported. For example,
part number 123-000 has 3 lines, or incidences, of shortages. This would
count as one. Part number 123-001 has one line, or incident, of shortage,
and this would also count as one. I scrolled through the list of solutions
under "Count", and didn't have any luck. Help is obviously appreciated.

Jeff



  #4  
Old March 4th, 2004, 11:18 PM
Dave R.
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

I don't know exactly your set up, but if I were in your shoes, I would
create a complete parts list in one sheet. This sheet would contain the
formulas to count incidents of shortages on the other worksheet, which is
the one linked to the database which I wouldn't put any formulas on (if I
could help it).

On the sheet which has the part numbers, I would put the formula next to
each part number --(COUNTIF(Sheet2!A$1:A$9999,D1)0)

D1 being the first part number in your list of all part numbers. This would
give you a 1 if the part number on your main sheet was found somewhere in
the range of your database linked sheet. If it was not found, you would get
a 0.

Since you may have many part numbers, many of them not needing any attention
(no shortages), I would then record a macro from the main sheet, which
selects the part number, and the value returned by the formula.. and sort
descending on the value, putting the items with the most shortages at the
top. You could then record another macro to sort by part number; and then
sort back and forth with the click of a button.

Hope that helps.



"jmdaniel" wrote in message
...
I have a file downloaded daily from Oracle that lists our critical

shortages by part number. These part numbers can have multiple incidences of
shortages. My task is to sort the file by part number, then establish the
number of different part numbers that have shortages reported. For example,
part number 123-000 has 3 lines, or incidences, of shortages. This would
count as one. Part number 123-001 has one line, or incident, of shortage,
and this would also count as one. I scrolled through the list of solutions
under "Count", and didn't have any luck. Help is obviously appreciated.

Jeff



  #5  
Old March 5th, 2004, 10:31 PM
jmdaniel
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

just get a div/0 error...
  #6  
Old March 5th, 2004, 10:31 PM
jmdaniel
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

which sheet does the formula go on, and what sheet is "Sheet1"? and what will copying down column B get me? sorry to not be seeing where this is going.

----- Bob Phillips wrote: -----

Hi Jeff,

You could put al of the part numbers in a column, say A, on another sheet,
and add this formula to B1
=MIN(1,COUNTIF(Sheet1!$A$1:$A$100,A1))
and copy down column B
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jmdaniel" wrote in message
...
I have a file downloaded daily from Oracle that lists our critical

shortages by part number. These part numbers can have multiple incidences of
shortages. My task is to sort the file by part number, then establish the
number of different part numbers that have shortages reported. For example,
part number 123-000 has 3 lines, or incidences, of shortages. This would
count as one. Part number 123-001 has one line, or incident, of shortage,
and this would also count as one. I scrolled through the list of solutions
under "Count", and didn't have any luck. Help is obviously appreciated.
Jeff




  #7  
Old March 5th, 2004, 10:40 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

Hi
IMHO this is not possible :-)
what is the exact formula you have entered and also have you change the
range A1:A1000 to your needs

--
Regards
Frank Kabel
Frankfurt, Germany

jmdaniel wrote:
just get a div/0 error...


  #8  
Old March 5th, 2004, 10:48 PM
Dave R.
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

Frank, the only way I got it to work correctly was to subtract 1 from the
value returned.. but I suppose this detail is the least of his concerns.

=SUMPRODUCT(1/COUNTIF(A1:A1000,A1:A1000&""))-1

"Frank Kabel" wrote in message
...
Hi
IMHO this is not possible :-)
what is the exact formula you have entered and also have you change the
range A1:A1000 to your needs

--
Regards
Frank Kabel
Frankfurt, Germany

jmdaniel wrote:
just get a div/0 error...




  #9  
Old March 5th, 2004, 10:52 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

Jeff,

This assumes that the downloaded data is on sheet1.

You then create a list of part numbers on another sheet, in column A, and
put that formula in column B.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jmdaniel" wrote in message
...
which sheet does the formula go on, and what sheet is "Sheet1"? and what

will copying down column B get me? sorry to not be seeing where this is
going.

----- Bob Phillips wrote: -----

Hi Jeff,

You could put al of the part numbers in a column, say A, on another

sheet,
and add this formula to B1
=MIN(1,COUNTIF(Sheet1!$A$1:$A$100,A1))
and copy down column B
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jmdaniel" wrote in message
...
I have a file downloaded daily from Oracle that lists our critical

shortages by part number. These part numbers can have multiple

incidences of
shortages. My task is to sort the file by part number, then establish

the
number of different part numbers that have shortages reported. For

example,
part number 123-000 has 3 lines, or incidences, of shortages. This

would
count as one. Part number 123-001 has one line, or incident, of

shortage,
and this would also count as one. I scrolled through the list of

solutions
under "Count", and didn't have any luck. Help is obviously

appreciated.
Jeff






  #10  
Old March 5th, 2004, 11:02 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Count incidences of part numbers

Hi Dave
yes this formula counts a blank row also as one occurence. The benefit
is that it does not throw a #DIV/0 error if a blank row is within the
range. This would happen for example with the formula
=SUMPRODUCT(1/COUNTIF(A1:A1000,A1:A1000))


I should have mentioned this trade-off though. so thanks for pointing
this out :-)

--
Regards
Frank Kabel
Frankfurt, Germany

Dave R. wrote:
Frank, the only way I got it to work correctly was to subtract 1 from
the value returned.. but I suppose this detail is the least of his
concerns.

=SUMPRODUCT(1/COUNTIF(A1:A1000,A1:A1000&""))-1

"Frank Kabel" wrote in message
...
Hi
IMHO this is not possible :-)
what is the exact formula you have entered and also have you change
the range A1:A1000 to your needs

--
Regards
Frank Kabel
Frankfurt, Germany

jmdaniel wrote:
just get a div/0 error...


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:36 PM.


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