可嘗試用VBA巨集處理 在這裡先參考處理資料 分出組別與數量表
Sub Sample()
Dim myRng As Range
Sheets(1).Activate
Set myRng = Columns(1)
myRng.AdvancedFilter _
Action:=xlFilterInPlace, _
Unique:=True
Set myRng = Nothing
Sheets.Add after:=Sheets(Sheets.Count)
Sheets(1).Activate
row1 = [A65336].End(xlUp).Row
Range("A1:A" & row1).Copy Sheets(Sheets.Count).Cells(1, 1)
On Error Resume Next
ActiveSheet.ShowAllData
On Error GoTo 0
Sheets(Sheets.Count).Activate
For i = 2 To [A65336].End(xlUp).Row
Cells(i, 2) = 0
am = Cells(i, 2)
For j = 2 To row1
If Sheets(1).Cells(j, 1) = Cells(i, 1) Then
bm = Sheets(1).Cells(j, 2)
If bm = "" Or bm = "NA" Then bm = 0
am = am + bm
End If
Next
Cells(i, 2) = am
Next
End Sub
之後可依數量作排序 再求四分位數作者: Hsieh 時間: 2010-11-8 10:05
C2陣列公式
{=IF(COUNTIF($A$1:A2,A2)=1,QUARTILE(IF($A$2:$A$315=A2,$B$2:$B$315),1),"")}作者: jimmy 時間: 2010-11-8 20:23