Dave,
(Boy, you're good!).
But, is there a way to get the count to appear on the row
ABOVE the first occurrence of the part-number?
In my workbook, each part-number has between 1 and xxx rows
and has 15 columns. (My workbook has 10,000+ rows).
My plan is to search for a particular count (like "11") and
paste a "block" of formulas into the cells that that count
applies to. I'd then repeat this search-and-paste process
for all of count-'11' cells.
I'd then search for a different count (like '7') and paste
an appropriate "block" of formulas for count-"7" cells.
I'd then do the same for all of the other counts.
(I know this means "searching-and-pasting" for every
occurrence of every count but I don't know a better way.
Do you?)
Gary
-----Original Message-----
You could do this kind of thing with a macro, but I wouldn't waste my time. If
you take advantage of the built in features, you'll find that your life is much
easier.
I'd do a data|subtotals on both columns. Use Sum and "add subtotal" to both
fields (you'll fix the first field later).
When you click ok, you'll see a new column A and the part number's will be
summed up (but it's meaningless (or 0 if your part numbers were text).)
But select column B (the part number column) and do:
Edit|Replace
what: (9,
with: (3,
The =subtotal(9,A2:Ax) (which sums)
will become
=subtotal(3,a2:ax) (which counts)
===
Another option you may want to consider is
Data|pivottables. You can add a