View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Pete_UK
 
Posts: n/a
Default Which function is most appropriate?

A starting point would be to copy column A to a new sheet, give it a
heading in A1 like "Number", then apply Data | Filter | Advanced Filter
to the column to obtain Unique records only and filter in place.

Then with the headings in B1 to D1 as shown in your example, you enter
this formula in B2 of the new sheet:

=SUM(IF(($A2=Sheet1!$A$2:$A$32000)*(B$1=Sheet1!$B$ 2:$B$32000),1,0))

The ranges should be adjusted if not exactly 32000. This is an array
formula, so when you have typed it in (and whenever you edit it) you
should use CTRL-SHIFT-ENTER instead of the normal ENTER, and if you are
successful then Excel will have wrapped curly braces { } around the
formula - do not type these yourself.

The formula can be copied across to D2, and then B2:D2 can be copied
down for as many entries as you have in column A. This should give you
a series of 1's and 0's under the unit columns, though you may have 2,
3 or 4 etc if you had duplicate entries in your original table.
Highlight all the data from B2 to D whatever, then click <copy Edit |
Paste Special | Values (check) OK and <Escto fix the values.

Now you can do Find and Replace (CTRL-H) on the highlighted block to
replace 1 with whatever symbol you like and you can replace 0 with
nothing. Bit quicker than doing it manually.

Hope this helps.

Pete