stats help

luvul8r

New Member
Joined
Jul 28, 2005
Messages
17
so heres what im working with

name Games starts closes 95-100 101+ 180 points avg
Adam l 12 5 4 0 1 15 1.25
Adam w 16 9 4 4 1 23 1.4375
Jim 16 5 7 4 0 23 1.4375
Bill 16 12 4 2 1 24 1.5
larry 16 6 5 1 2 21 1.3125
daniel 12 5 5 1 2 20 1.666666667
craig 12 5 0 1 1 8 0.666666667
dj 12 5 2 1 0 10 0.833333333
jason 16 12 5 4 5 36 2.25
stephen 4 2 0 2 0.5
chris 4 2 0 2 0.5

this is my table
the points colums have function =SUM(C2,D2*2,E2,F2*2,G2*2) starts and 95-100 are 1 point closes and 101+ and 80 are 2 points and avg colum has function =SUM(H2/B2)
now i need a macro thats going to take all these stats with the name and put them in order based on the average
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
so ive gotte alot of help and its almost perfect just need some help to put me over the top

heres my macro

Sub adam()
Dim x As Long, y As Long, a As Long, b As Long, c As Long, d As Long, e As Long

Worksheets("sheet2").Cells.ClearContents

y = Worksheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Row
For a = 2 To y
x = 2
Worksheets("sheet2").Cells(a, x) = Worksheets("sheet1").Cells(a, 1)
x = x + 1
Worksheets("sheet2").Cells(a, x) = Worksheets("sheet1").Cells(a, 3) + Worksheets("sheet1").Cells(a, 4) * 2 + Worksheets("sheet1").Cells(a, 5) + Worksheets("sheet1").Cells(a, 6) * 2
x = x + 1
Worksheets("sheet2").Cells(a, x) = Worksheets("sheet2").Cells(a, x - 1) / Worksheets("sheet1").Cells(a, 2)
Worksheets("sheet2").Cells(a, 1) = Worksheets("sheet2").Cells(a, x - 1) / Worksheets("sheet1").Cells(a, 2)
Next a
For b = 2 To y
Worksheets("sheet2").Cells(b, 5) = "=LARGE(A2:A" & y & "," & b - 1 & ")"
Worksheets("sheet2").Cells(b, 6) = "=VLOOKUP(E" & b & ",A2:B" & y & ",2,false)"
Worksheets("sheet2").Cells(1, 16) = "=match(E" & b & ",A2:a" & y & ",0)"
e = Worksheets("sheet2").Cells(1, 16)
MsgBox e
For d = 6 To 14
Worksheets("sheet3").Cells(b, d) = Worksheets("sheet1").Cells(e + 1, d - 5)
Next d
Next b
MsgBox "Pasting TO SHEET 2 complete"
End Sub

i input the stats on sheet 1 it runs on sheet 2 and pastes everything nicely on page 3

however its posting it colum f-n not sure how to move it over

and when i have 2 people tied it posts the same name 2 times and skips one of the names

ex stephen and chris are tied posts stephens name 2 times and doesnt post chris name
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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