Calculate average for filtered rows dynamically - VBA

sangria11

New Member
Joined
Oct 27, 2016
Messages
3
I have a table where I need to find the elements present in different samples.
For every sample, the no of iterations is a variable - I can have two rows of sample 1 and 3 rows of sample2 or 5 rows of sample4. the number of columns which are the elements can also be different. I have considered 3 samples and 17 elements in this case.
I need to filter based on the sample. All entries corresponding to sample1 needs to be copied to the next spreadsheet and the average needs to be calculated for the entire row of sample 1 , then sample 2 and so on


I am a beginner in vba and hence the code I used is not able to do it for dynamic range of values. Also, I can only calculate the average using macro recorder. I am not aware how to combine these two codes into one. I tried to search a lot on this topic


I have included the expected results and my codes as well.
Any help would be much appreciated!!! Thank you

Code:
[/SIZE]
[SIZE=1]    Sub sorttable()[/SIZE]
[SIZE=1]        Dim j As Long 'row variable[/SIZE]
[SIZE=1]        On Error GoTo Err_Execute[/SIZE]
[SIZE=1]        Dim i As Long[/SIZE]
    'Start search in row 1 in sheet1
[SIZE=1]        j = 1[/SIZE]
[SIZE=1]    'Column counter for sheet2[/SIZE]
[SIZE=1]       i = 1[/SIZE]
[SIZE=1]     While Len(Range("A" & CStr(j)).Value) > 0[/SIZE]
[SIZE=1]
[/SIZE]
[SIZE=1]        If Range("A" & CStr(j)).Value = "Sample1" Then[/SIZE]
[SIZE=1]            Range(Range("A" & CStr(j)), Range("A" & CStr(j)).End(xlToRight)).Select[/SIZE]
[SIZE=1]            Selection.Copy[/SIZE]
[SIZE=1]            Sheets("Sheet2").Select[/SIZE]
[SIZE=1]            Sheet2.Cells(i, 1).Select[/SIZE]
[SIZE=1]            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _[/SIZE]
[SIZE=1]            :=False, Transpose:=False[/SIZE]
[SIZE=1]            ' Debug.Print Cells(j + 1, 1) = "=AVERAGE(A1:C" & j - 1 & ")"   ' This is the line i used to calculate average in between the cells, I guess it is         wrong and it     gives me error[/SIZE]
[SIZE=1]            'Move counter to next Column[/SIZE]
[SIZE=1]            i = i + 1[/SIZE]
[SIZE=1]            'Go back to Sheet1 to continue searching[/SIZE]
[SIZE=1]            Sheets("Sheet1").Select[/SIZE]
[SIZE=1]        ElseIf Range("A" & CStr(j)).Value = "Sample2" Then[/SIZE]
[SIZE=1]            Range(Range("A" & CStr(j)), Range("A" & CStr(j)).End(xlToRight)).Select[/SIZE]
[SIZE=1]            Selection.Copy[/SIZE]
[SIZE=1]                   Sheets("Sheet2").Select[/SIZE]
[SIZE=1]            Sheet2.Cells(i, 1).Select[/SIZE]
[SIZE=1]            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _[/SIZE]
[SIZE=1]            :=False, Transpose:=False[/SIZE]
[SIZE=1]            'Move counter to next Column[/SIZE]
[SIZE=1]           i = i + 1[/SIZE]
[SIZE=1]           Sheets("Sheet1").Select[/SIZE]
[SIZE=1]        ElseIf Range("A" & CStr(j)).Value = "Sample3" Then[/SIZE]
[SIZE=1]            Range(Range("A" & CStr(j)), Range("A" & CStr(j)).End(xlToRight)).Select[/SIZE]
[SIZE=1]            Selection.Copy[/SIZE]
[SIZE=1]                  Sheets("Sheet2").Select[/SIZE]
[SIZE=1]            Sheet2.Cells(i, 1).Select[/SIZE]
[SIZE=1]            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _[/SIZE]
[SIZE=1]            :=False, Transpose:=False[/SIZE]
[SIZE=1]            'Move counter to next Column[/SIZE]
[SIZE=1]            i = i + 1[/SIZE]
[SIZE=1]            'Go back to Sheet1 to continue searching[/SIZE]
[SIZE=1]            Sheets("Sheet1").Select[/SIZE]
[SIZE=1]        End If[/SIZE]
[SIZE=1]            j = j + 1[/SIZE]
[SIZE=1]      Wend[/SIZE]
   Application.CutCopyMode = False
[SIZE=1]   MsgBox "the values have been extracted"[/SIZE]
[SIZE=1]  Exit Sub[/SIZE]
[SIZE=1]    Err_Execute:[/SIZE]
[SIZE=1]   MsgBox "Error Occured"[/SIZE]
[SIZE=1]    End Sub[/SIZE]
[SIZE=1][\code][/SIZE]

[SIZE=1]
[/SIZE][SIZE=1][code]  part of it for calculating the average[/SIZE]
[SIZE=1]    Application.CutCopyMode = False[/SIZE]
[SIZE=1]    Selection.AutoFill Destination:=Range("A9:B9"), Type:=xlFillDefault[/SIZE]
[SIZE=1]    Range("A9:B9").Select[/SIZE]
[SIZE=1]    Range("B9").Select[/SIZE]
[SIZE=1]    Selection.ClearContents[/SIZE]
[SIZE=1]    ActiveCell.FormulaR1C1 = "= AVERAGE(R[-2]C,R[-1]C)"[/SIZE]
[SIZE=1]    Range("B9").Select[/SIZE]
[SIZE=1]    Selection.AutoFill Destination:=Range("B9:R9"), Type:=xlFillDefault[/SIZE]
[SIZE=1]    Range("B9:R9").Select[/SIZE]
[SIZE=1]    Range("A11").Select[/SIZE]
[SIZE=1]    Sheets("Sheet2").Select[/SIZE]
[SIZE=1]    Range("A27").Select[/SIZE]
[SIZE=1]    Sheets("Sheet1").Select[/SIZE]
[SIZE=1]    Range("A8:R10").Select[/SIZE]
[SIZE=1]    Selection.Copy[/SIZE]
[SIZE=1]    Sheets("Sheet2").Select[/SIZE]
[SIZE=1]    Range("A11").Select[/SIZE]
[SIZE=1]    ActiveSheet.Paste[/SIZE]
[SIZE=1]    Range("A14").Select[/SIZE]
[SIZE=1]    Application.CutCopyMode = False[/SIZE]
[SIZE=1]    Selection.Style = "Normal 2"[/SIZE]
[SIZE=1]    ActiveCell.FormulaR1C1 = "Average"[/SIZE]
[SIZE=1]    Range("B14").Select[/SIZE]
[SIZE=1]    ActiveCell.FormulaR1C1 = "= AVERAGE(R[-3]C:R[-1]C)"[/SIZE]
[SIZE=1]    Range("B14").Select[/SIZE]
[SIZE=1]    Selection.AutoFill Destination:=Range("B14:R14"), Type:=xlFillDefault[/SIZE]
[SIZE=1]    Range("B14:R14").Select[/SIZE]
[SIZE=1]    Range("A16").Select[/SIZE]
[SIZE=1]End Sub[/SIZE]
[SIZE=1]
[/SIZE]
[SIZE=1][\code]


Table (data)

[/SIZE][TABLE="width: 1152"]
<tbody>[TR]
[TD="class: xl66, width: 64"][SIZE=1]Sample[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El1[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El2[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El3[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El4[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El5[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El6[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El7[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El8[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El9[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El10[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El11[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El12[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El13[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El14[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El15[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El16[/SIZE][/TD]
[TD="class: xl66, width: 64"][SIZE=1]El17[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample1[/SIZE][/TD]
[TD="align: right"][SIZE=1]393331[/SIZE][/TD]
[TD="align: right"][SIZE=1]1504481[/SIZE][/TD]
[TD="align: right"][SIZE=1]75778[/SIZE][/TD]
[TD="align: right"][SIZE=1]4417[/SIZE][/TD]
[TD="align: right"][SIZE=1]943[/SIZE][/TD]
[TD="align: right"][SIZE=1]123913[/SIZE][/TD]
[TD="align: right"][SIZE=1]1390[/SIZE][/TD]
[TD="align: right"][SIZE=1]7[/SIZE][/TD]
[TD="align: right"][SIZE=1]7[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]0[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]0[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]0[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]7[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample1[/SIZE][/TD]
[TD="align: right"][SIZE=1]412063[/SIZE][/TD]
[TD="align: right"][SIZE=1]1438405[/SIZE][/TD]
[TD="align: right"][SIZE=1]76769[/SIZE][/TD]
[TD="align: right"][SIZE=1]4454[/SIZE][/TD]
[TD="align: right"][SIZE=1]44147820[/SIZE][/TD]
[TD="align: right"][SIZE=1]129880[/SIZE][/TD]
[TD="align: right"][SIZE=1]1580[/SIZE][/TD]
[TD="align: right"][SIZE=1]22333[/SIZE][/TD]
[TD="align: right"][SIZE=1]3.09E+08[/SIZE][/TD]
[TD="align: right"][SIZE=1]73549450[/SIZE][/TD]
[TD="align: right"][SIZE=1]30502700[/SIZE][/TD]
[TD="align: right"][SIZE=1]3906902[/SIZE][/TD]
[TD="align: right"][SIZE=1]15488000[/SIZE][/TD]
[TD="align: right"][SIZE=1]24554970[/SIZE][/TD]
[TD="align: right"][SIZE=1]18558080[/SIZE][/TD]
[TD="align: right"][SIZE=1]7456669[/SIZE][/TD]
[TD="align: right"][SIZE=1]11010050[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample2[/SIZE][/TD]
[TD="align: right"][SIZE=1]428819[/SIZE][/TD]
[TD="align: right"][SIZE=1]1371168[/SIZE][/TD]
[TD="align: right"][SIZE=1]67321[/SIZE][/TD]
[TD="align: right"][SIZE=1]3947[/SIZE][/TD]
[TD="align: right"][SIZE=1]43852940[/SIZE][/TD]
[TD="align: right"][SIZE=1]121679[/SIZE][/TD]
[TD="align: right"][SIZE=1]1373[/SIZE][/TD]
[TD="align: right"][SIZE=1]22640[/SIZE][/TD]
[TD="align: right"][SIZE=1]2.95E+08[/SIZE][/TD]
[TD="align: right"][SIZE=1]69845060[/SIZE][/TD]
[TD="align: right"][SIZE=1]27878150[/SIZE][/TD]
[TD="align: right"][SIZE=1]4000339[/SIZE][/TD]
[TD="align: right"][SIZE=1]14100450[/SIZE][/TD]
[TD="align: right"][SIZE=1]22153440[/SIZE][/TD]
[TD="align: right"][SIZE=1]17136190[/SIZE][/TD]
[TD="align: right"][SIZE=1]6752473[/SIZE][/TD]
[TD="align: right"][SIZE=1]9827803[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample2[/SIZE][/TD]
[TD="align: right"][SIZE=1]424563[/SIZE][/TD]
[TD="align: right"][SIZE=1]1439610[/SIZE][/TD]
[TD="align: right"][SIZE=1]71472[/SIZE][/TD]
[TD="align: right"][SIZE=1]4484[/SIZE][/TD]
[TD="align: right"][SIZE=1]44790560[/SIZE][/TD]
[TD="align: right"][SIZE=1]126363[/SIZE][/TD]
[TD="align: right"][SIZE=1]1350[/SIZE][/TD]
[TD="align: right"][SIZE=1]21676[/SIZE][/TD]
[TD="align: right"][SIZE=1]3.01E+08[/SIZE][/TD]
[TD="align: right"][SIZE=1]69680380[/SIZE][/TD]
[TD="align: right"][SIZE=1]28027090[/SIZE][/TD]
[TD="align: right"][SIZE=1]3559731[/SIZE][/TD]
[TD="align: right"][SIZE=1]14267580[/SIZE][/TD]
[TD="align: right"][SIZE=1]22478890[/SIZE][/TD]
[TD="align: right"][SIZE=1]16818990[/SIZE][/TD]
[TD="align: right"][SIZE=1]6909726[/SIZE][/TD]
[TD="align: right"][SIZE=1]9788499[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample3[/SIZE][/TD]
[TD="align: right"][SIZE=1]442984[/SIZE][/TD]
[TD="align: right"][SIZE=1]1418608[/SIZE][/TD]
[TD="align: right"][SIZE=1]66124[/SIZE][/TD]
[TD="align: right"][SIZE=1]4571[/SIZE][/TD]
[TD="align: right"][SIZE=1]46818160[/SIZE][/TD]
[TD="align: right"][SIZE=1]103528[/SIZE][/TD]
[TD="align: right"][SIZE=1]940[/SIZE][/TD]
[TD="align: right"][SIZE=1]45648[/SIZE][/TD]
[TD="align: right"][SIZE=1]3.16E+08[/SIZE][/TD]
[TD="align: right"][SIZE=1]75111780[/SIZE][/TD]
[TD="align: right"][SIZE=1]26088990[/SIZE][/TD]
[TD="align: right"][SIZE=1]3618853[/SIZE][/TD]
[TD="align: right"][SIZE=1]14567820[/SIZE][/TD]
[TD="align: right"][SIZE=1]23493420[/SIZE][/TD]
[TD="align: right"][SIZE=1]17066320[/SIZE][/TD]
[TD="align: right"][SIZE=1]7516863[/SIZE][/TD]
[TD="align: right"][SIZE=1]11084680[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample3[/SIZE][/TD]
[TD="align: right"][SIZE=1]438080[/SIZE][/TD]
[TD="align: right"][SIZE=1]1437939[/SIZE][/TD]
[TD="align: right"][SIZE=1]69390[/SIZE][/TD]
[TD="align: right"][SIZE=1]4801[/SIZE][/TD]
[TD="align: right"][SIZE=1]44814690[/SIZE][/TD]
[TD="align: right"][SIZE=1]104542[/SIZE][/TD]
[TD="align: right"][SIZE=1]863[/SIZE][/TD]
[TD="align: right"][SIZE=1]43491[/SIZE][/TD]
[TD="align: right"][SIZE=1]3.2E+08[/SIZE][/TD]
[TD="align: right"][SIZE=1]75668430[/SIZE][/TD]
[TD="align: right"][SIZE=1]27034060[/SIZE][/TD]
[TD="align: right"][SIZE=1]3533046[/SIZE][/TD]
[TD="align: right"][SIZE=1]15121640[/SIZE][/TD]
[TD="align: right"][SIZE=1]23136970[/SIZE][/TD]
[TD="align: right"][SIZE=1]17178350[/SIZE][/TD]
[TD="align: right"][SIZE=1]7412860[/SIZE][/TD]
[TD="align: right"][SIZE=1]11065210[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample3[/SIZE][/TD]
[TD="align: right"][SIZE=1]436716[/SIZE][/TD]
[TD="align: right"][SIZE=1]1381712[/SIZE][/TD]
[TD="align: right"][SIZE=1]64563[/SIZE][/TD]
[TD="align: right"][SIZE=1]4671[/SIZE][/TD]
[TD="align: right"][SIZE=1]48130480[/SIZE][/TD]
[TD="align: right"][SIZE=1]106974[/SIZE][/TD]
[TD="align: right"][SIZE=1]1237[/SIZE][/TD]
[TD="align: right"][SIZE=1]55891[/SIZE][/TD]
[TD="align: right"][SIZE=1]3.59E+08[/SIZE][/TD]
[TD="align: right"][SIZE=1]81091740[/SIZE][/TD]
[TD="align: right"][SIZE=1]28725960[/SIZE][/TD]
[TD="align: right"][SIZE=1]3533523[/SIZE][/TD]
[TD="align: right"][SIZE=1]15826380[/SIZE][/TD]
[TD="align: right"][SIZE=1]25076590[/SIZE][/TD]
[TD="align: right"][SIZE=1]19268820[/SIZE][/TD]
[TD="align: right"][SIZE=1]8463176[/SIZE][/TD]
[TD="align: right"][SIZE=1]12399330[/SIZE][/TD]
[/TR]
</tbody>[/TABLE]


Expected Results

[TABLE="width: 1172"]
<tbody>[TR]
[TD][SIZE=1]Sample1[/SIZE][/TD]
[TD="align: right"][SIZE=1]393331[/SIZE][/TD]
[TD="align: right"][SIZE=1]1504481[/SIZE][/TD]
[TD="align: right"][SIZE=1]75778[/SIZE][/TD]
[TD="align: right"][SIZE=1]4417[/SIZE][/TD]
[TD="align: right"][SIZE=1]943[/SIZE][/TD]
[TD="align: right"][SIZE=1]123913[/SIZE][/TD]
[TD="align: right"][SIZE=1]1390[/SIZE][/TD]
[TD="align: right"][SIZE=1]7[/SIZE][/TD]
[TD="align: right"][SIZE=1]7[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]0[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]0[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]0[/SIZE][/TD]
[TD="align: right"][SIZE=1]3[/SIZE][/TD]
[TD="align: right"][SIZE=1]7[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample1[/SIZE][/TD]
[TD="align: right"][SIZE=1]412063[/SIZE][/TD]
[TD="align: right"][SIZE=1]1438405[/SIZE][/TD]
[TD="align: right"][SIZE=1]76769[/SIZE][/TD]
[TD="align: right"][SIZE=1]4454[/SIZE][/TD]
[TD="align: right"][SIZE=1]44147820[/SIZE][/TD]
[TD="align: right"][SIZE=1]129880[/SIZE][/TD]
[TD="align: right"][SIZE=1]1580[/SIZE][/TD]
[TD="align: right"][SIZE=1]22333[/SIZE][/TD]
[TD="align: right"][SIZE=1]309360000[/SIZE][/TD]
[TD="align: right"][SIZE=1]73549450[/SIZE][/TD]
[TD="align: right"][SIZE=1]30502700[/SIZE][/TD]
[TD="align: right"][SIZE=1]3906902[/SIZE][/TD]
[TD="align: right"][SIZE=1]15488000[/SIZE][/TD]
[TD="align: right"][SIZE=1]24554970[/SIZE][/TD]
[TD="align: right"][SIZE=1]18558080[/SIZE][/TD]
[TD="align: right"][SIZE=1]7456669[/SIZE][/TD]
[TD="align: right"][SIZE=1]11010050[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Average[/SIZE][/TD]
[TD="align: right"][SIZE=1]402697[/SIZE][/TD]
[TD="align: right"][SIZE=1]1471443[/SIZE][/TD]
[TD="align: right"][SIZE=1]76273.5[/SIZE][/TD]
[TD="align: right"][SIZE=1]4435.5[/SIZE][/TD]
[TD="align: right"][SIZE=1]22074382[/SIZE][/TD]
[TD="align: right"][SIZE=1]126896.5[/SIZE][/TD]
[TD="align: right"][SIZE=1]1485[/SIZE][/TD]
[TD="align: right"][SIZE=1]11170[/SIZE][/TD]
[TD="align: right"][SIZE=1]154680003.5[/SIZE][/TD]
[TD="align: right"][SIZE=1]36774727[/SIZE][/TD]
[TD="align: right"][SIZE=1]15251350[/SIZE][/TD]
[TD="align: right"][SIZE=1]1953453[/SIZE][/TD]
[TD="align: right"][SIZE=1]7744000[/SIZE][/TD]
[TD="align: right"][SIZE=1]12277487[/SIZE][/TD]
[TD="align: right"][SIZE=1]9279040[/SIZE][/TD]
[TD="align: right"][SIZE=1]3728336[/SIZE][/TD]
[TD="align: right"][SIZE=1]5505029[/SIZE][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample2[/SIZE][/TD]
[TD="align: right"][SIZE=1]428819[/SIZE][/TD]
[TD="align: right"][SIZE=1]1371168[/SIZE][/TD]
[TD="align: right"][SIZE=1]67321[/SIZE][/TD]
[TD="align: right"][SIZE=1]3947[/SIZE][/TD]
[TD="align: right"][SIZE=1]43852940[/SIZE][/TD]
[TD="align: right"][SIZE=1]121679[/SIZE][/TD]
[TD="align: right"][SIZE=1]1373[/SIZE][/TD]
[TD="align: right"][SIZE=1]22640[/SIZE][/TD]
[TD="align: right"][SIZE=1]294530000[/SIZE][/TD]
[TD="align: right"][SIZE=1]69845060[/SIZE][/TD]
[TD="align: right"][SIZE=1]27878150[/SIZE][/TD]
[TD="align: right"][SIZE=1]4000339[/SIZE][/TD]
[TD="align: right"][SIZE=1]14100450[/SIZE][/TD]
[TD="align: right"][SIZE=1]22153440[/SIZE][/TD]
[TD="align: right"][SIZE=1]17136190[/SIZE][/TD]
[TD="align: right"][SIZE=1]6752473[/SIZE][/TD]
[TD="align: right"][SIZE=1]9827803[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample2[/SIZE][/TD]
[TD="align: right"][SIZE=1]424563[/SIZE][/TD]
[TD="align: right"][SIZE=1]1439610[/SIZE][/TD]
[TD="align: right"][SIZE=1]71472[/SIZE][/TD]
[TD="align: right"][SIZE=1]4484[/SIZE][/TD]
[TD="align: right"][SIZE=1]44790560[/SIZE][/TD]
[TD="align: right"][SIZE=1]126363[/SIZE][/TD]
[TD="align: right"][SIZE=1]1350[/SIZE][/TD]
[TD="align: right"][SIZE=1]21676[/SIZE][/TD]
[TD="align: right"][SIZE=1]301350000[/SIZE][/TD]
[TD="align: right"][SIZE=1]69680380[/SIZE][/TD]
[TD="align: right"][SIZE=1]28027090[/SIZE][/TD]
[TD="align: right"][SIZE=1]3559731[/SIZE][/TD]
[TD="align: right"][SIZE=1]14267580[/SIZE][/TD]
[TD="align: right"][SIZE=1]22478890[/SIZE][/TD]
[TD="align: right"][SIZE=1]16818990[/SIZE][/TD]
[TD="align: right"][SIZE=1]6909726[/SIZE][/TD]
[TD="align: right"][SIZE=1]9788499[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Average[/SIZE][/TD]
[TD="align: right"][SIZE=1]426691[/SIZE][/TD]
[TD="align: right"][SIZE=1]1405389[/SIZE][/TD]
[TD="align: right"][SIZE=1]69396.5[/SIZE][/TD]
[TD="align: right"][SIZE=1]4215.5[/SIZE][/TD]
[TD="align: right"][SIZE=1]44321750[/SIZE][/TD]
[TD="align: right"][SIZE=1]124021[/SIZE][/TD]
[TD="align: right"][SIZE=1]1361.5[/SIZE][/TD]
[TD="align: right"][SIZE=1]22158[/SIZE][/TD]
[TD="align: right"][SIZE=1]297940000[/SIZE][/TD]
[TD="align: right"][SIZE=1]69762720[/SIZE][/TD]
[TD="align: right"][SIZE=1]27952620[/SIZE][/TD]
[TD="align: right"][SIZE=1]3780035[/SIZE][/TD]
[TD="align: right"][SIZE=1]14184015[/SIZE][/TD]
[TD="align: right"][SIZE=1]22316165[/SIZE][/TD]
[TD="align: right"][SIZE=1]16977590[/SIZE][/TD]
[TD="align: right"][SIZE=1]6831100[/SIZE][/TD]
[TD="align: right"][SIZE=1]9808151[/SIZE][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample3[/SIZE][/TD]
[TD="align: right"][SIZE=1]442984[/SIZE][/TD]
[TD="align: right"][SIZE=1]1418608[/SIZE][/TD]
[TD="align: right"][SIZE=1]66124[/SIZE][/TD]
[TD="align: right"][SIZE=1]4571[/SIZE][/TD]
[TD="align: right"][SIZE=1]46818160[/SIZE][/TD]
[TD="align: right"][SIZE=1]103528[/SIZE][/TD]
[TD="align: right"][SIZE=1]940[/SIZE][/TD]
[TD="align: right"][SIZE=1]45648[/SIZE][/TD]
[TD="align: right"][SIZE=1]316340000[/SIZE][/TD]
[TD="align: right"][SIZE=1]75111780[/SIZE][/TD]
[TD="align: right"][SIZE=1]26088990[/SIZE][/TD]
[TD="align: right"][SIZE=1]3618853[/SIZE][/TD]
[TD="align: right"][SIZE=1]14567820[/SIZE][/TD]
[TD="align: right"][SIZE=1]23493420[/SIZE][/TD]
[TD="align: right"][SIZE=1]17066320[/SIZE][/TD]
[TD="align: right"][SIZE=1]7516863[/SIZE][/TD]
[TD="align: right"][SIZE=1]11084680[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample3[/SIZE][/TD]
[TD="align: right"][SIZE=1]438080[/SIZE][/TD]
[TD="align: right"][SIZE=1]1437939[/SIZE][/TD]
[TD="align: right"][SIZE=1]69390[/SIZE][/TD]
[TD="align: right"][SIZE=1]4801[/SIZE][/TD]
[TD="align: right"][SIZE=1]44814690[/SIZE][/TD]
[TD="align: right"][SIZE=1]104542[/SIZE][/TD]
[TD="align: right"][SIZE=1]863[/SIZE][/TD]
[TD="align: right"][SIZE=1]43491[/SIZE][/TD]
[TD="align: right"][SIZE=1]320310000[/SIZE][/TD]
[TD="align: right"][SIZE=1]75668430[/SIZE][/TD]
[TD="align: right"][SIZE=1]27034060[/SIZE][/TD]
[TD="align: right"][SIZE=1]3533046[/SIZE][/TD]
[TD="align: right"][SIZE=1]15121640[/SIZE][/TD]
[TD="align: right"][SIZE=1]23136970[/SIZE][/TD]
[TD="align: right"][SIZE=1]17178350[/SIZE][/TD]
[TD="align: right"][SIZE=1]7412860[/SIZE][/TD]
[TD="align: right"][SIZE=1]11065210[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Sample3[/SIZE][/TD]
[TD="align: right"][SIZE=1]436716[/SIZE][/TD]
[TD="align: right"][SIZE=1]1381712[/SIZE][/TD]
[TD="align: right"][SIZE=1]64563[/SIZE][/TD]
[TD="align: right"][SIZE=1]4671[/SIZE][/TD]
[TD="align: right"][SIZE=1]48130480[/SIZE][/TD]
[TD="align: right"][SIZE=1]106974[/SIZE][/TD]
[TD="align: right"][SIZE=1]1237[/SIZE][/TD]
[TD="align: right"][SIZE=1]55891[/SIZE][/TD]
[TD="align: right"][SIZE=1]359420000[/SIZE][/TD]
[TD="align: right"][SIZE=1]81091740[/SIZE][/TD]
[TD="align: right"][SIZE=1]28725960[/SIZE][/TD]
[TD="align: right"][SIZE=1]3533523[/SIZE][/TD]
[TD="align: right"][SIZE=1]15826380[/SIZE][/TD]
[TD="align: right"][SIZE=1]25076590[/SIZE][/TD]
[TD="align: right"][SIZE=1]19268820[/SIZE][/TD]
[TD="align: right"][SIZE=1]8463176[/SIZE][/TD]
[TD="align: right"][SIZE=1]12399330[/SIZE][/TD]
[/TR]
[TR]
[TD][SIZE=1]Average[/SIZE][/TD]
[TD="align: right"][SIZE=1]439260[/SIZE][/TD]
[TD="align: right"][SIZE=1]1412753[/SIZE][/TD]
[TD="align: right"][SIZE=1]66692.33[/SIZE][/TD]
[TD="align: right"][SIZE=1]4681[/SIZE][/TD]
[TD="align: right"][SIZE=1]46587777[/SIZE][/TD]
[TD="align: right"][SIZE=1]105014.7[/SIZE][/TD]
[TD="align: right"][SIZE=1]1013.333[/SIZE][/TD]
[TD="align: right"][SIZE=1]48343.33[/SIZE][/TD]
[TD="align: right"][SIZE=1]332023333.3[/SIZE][/TD]
[TD="align: right"][SIZE=1]77290650[/SIZE][/TD]
[TD="align: right"][SIZE=1]27283003[/SIZE][/TD]
[TD="align: right"][SIZE=1]3561807[/SIZE][/TD]
[TD="align: right"][SIZE=1]15171947[/SIZE][/TD]
[TD="align: right"][SIZE=1]23902327[/SIZE][/TD]
[TD="align: right"][SIZE=1]17837830[/SIZE][/TD]
[TD="align: right"][SIZE=1]7797633[/SIZE][/TD]
[TD="align: right"][SIZE=1]11516407[/SIZE][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top