View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leo Heuser Leo Heuser is offline
external usenet poster
 
Posts: 266
Default Reverse Frequency

"smandula" skrev i en meddelelse
ups.com...
Need to list the individual frquencies for each Number
i.e.
Number Frequency
1 10
2 7
3 11
4 5
5 3
6 6
7 8
8 9
9 9
10 9
11 7
12 10
13 5
14 5
To Look like the following.

Frequency
3 5 7 8 9 10
------------------------------------------
5 4 2 7 8 1
13 11 9 12
14 10

A reverse frequency with individual lookup in ascending order.

Any suggestions would be appreciated.

With thanks



Assuming your data in A2:B25, here´s a formula solution.

Array formulae must be concluded with <Shift<Ctrl<Enter, also
if you edit them later. If done correctly, the formula in the formula
bar will be enclosed in braces { }. Don't enter these braces yourself.

In E2 enter this array formula (D2 must be present and empty (or
at least must not contain data present in B2:B25)):

=MIN(IF((COUNTIF($D$2:D2, $B$2:$B$25)=0)*($B$2:$B$25<""),$B$2:$B$25))

Copy E2 to the right with the fill handle (the little square in the lower
right corner of the cell) until zeros are displayed (e.g. in L2).


In E3 this formula (not an array formula):

=INDEX($A$2:$A$25,MATCH(E$2,$B$2:$B$25,0))

Copy E3 to F3:L3.


In E4 this array formula:

=IF(ROW()-ROW($E$4)+2COUNTIF($B$2:$B$25,E$2),"-",
INDEX($A$2:$A$25,MIN(IF(($B$2:$B$25=E$2)*(COUNTIF( $E$3:E3,$A$2:$A$25)=0),ROW($B$2:$B$25)-ROW($B$2)+1))))

Copy E4 to F4:L4
While E4:L4 is selected, copy the selection down as far as necessary.

--
Best regards
Leo Heuser

Followup to newsgroup only please.