View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 38
Default Creating a formula to identify highest figure

Run this macro in a new worksheet, you will see.

Sub Macro1()
' data ---
Range("A4") = "football"
Range("A5") = "math"
Range("A6") = "history"
Range("B4") = "12"
Range("B5") = "19"
Range("B6") = "15"
' analizer
Range("D4") =
"=IF(A4="""","""",INDEX($A$4:$A$20,MATCH(E4,$B$4:$ B$20,0)))"
Range("E4") = "=IF(A4="""","""",LARGE($B$4:$B$15,ROW()-3))"
Range("D4:E4").AutoFill Destination:=Range("D4:E20"),
Type:=xlFillDefault
End Sub

"0greeny0" wrote in message
...
Thats great, thank you. Next question!! :)

Is there a way that the name of the column could be displayed as well as
the
contents of the cell?

For example, if a students top grade was an A for Football, could the word
Football come up as well as the grade?

"Earl Kiosterud" wrote:

For the highest: =LARGE(D2:D21, 1)
For the second highest: =LARGE(D2:D21, 2)
etc.

Or you could sort the table descending; the largest would be at the top.
--
Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
"0greeny0" wrote in message
...
How do you create a formula to automatically calculate which figure are
the
highest and place them into a seperate cell?

For example, if i have a spreadsheet containing students scores and i
need
to identify their highest scoring activities and their marks given.
This may
start off as having up to 20 marks and identifying their top three.

Thanks