Morning all,
I have a long list of the example data below and would like to bring back the top 5 site names (based on highest number in "kWh" descending) where the manager is "Graham" and open / Closed is "Open".
Any help would be appreciated:
[TABLE="width: 372"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Manager[/TD]
[TD]Open / Closed[/TD]
[TD]kWh[/TD]
[/TR]
[TR]
[TD]Site 1[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]2,746[/TD]
[/TR]
[TR]
[TD]Site 2[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]2,458[/TD]
[/TR]
[TR]
[TD]Site 3[/TD]
[TD]Graham[/TD]
[TD]Closed[/TD]
[TD]1,643[/TD]
[/TR]
[TR]
[TD]Site 4[/TD]
[TD]Graham[/TD]
[TD]Closed[/TD]
[TD]4,312[/TD]
[/TR]
[TR]
[TD]Site 5[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]3,408[/TD]
[/TR]
[TR]
[TD]Site 6[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]580[/TD]
[/TR]
[TR]
[TD]Site 7[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]1,601[/TD]
[/TR]
[TR]
[TD]Site 8[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]890[/TD]
[/TR]
[TR]
[TD]Site 9[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]3,613[/TD]
[/TR]
[TR]
[TD]Site 10[/TD]
[TD]Lee[/TD]
[TD]Closed[/TD]
[TD]4,664[/TD]
[/TR]
[TR]
[TD]Site 11[/TD]
[TD]Brian[/TD]
[TD]Open[/TD]
[TD]4,255[/TD]
[/TR]
[TR]
[TD]Site 12[/TD]
[TD]Paula[/TD]
[TD]Open[/TD]
[TD]525[/TD]
[/TR]
[TR]
[TD]Site 13[/TD]
[TD]Brian[/TD]
[TD]Open[/TD]
[TD]3,529[/TD]
[/TR]
[TR]
[TD]Site 14[/TD]
[TD]Adrian[/TD]
[TD]Open[/TD]
[TD]3,986[/TD]
[/TR]
[TR]
[TD]Site 15[/TD]
[TD]Adrian[/TD]
[TD]Open[/TD]
[TD]2,335[/TD]
[/TR]
[TR]
[TD]Site 16[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]914[/TD]
[/TR]
[TR]
[TD]Site 17[/TD]
[TD]Adrian[/TD]
[TD]Open[/TD]
[TD]1,541[/TD]
[/TR]
[TR]
[TD]Site 18[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]4,026[/TD]
[/TR]
[TR]
[TD]Site 19[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]3,660[/TD]
[/TR]
[TR]
[TD]Site 20[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]3,628[/TD]
[/TR]
[TR]
[TD]Site 21[/TD]
[TD]Phil[/TD]
[TD]Closed[/TD]
[TD]1,506[/TD]
[/TR]
[TR]
[TD]Site 22[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]1,211[/TD]
[/TR]
</tbody>[/TABLE]
I have a long list of the example data below and would like to bring back the top 5 site names (based on highest number in "kWh" descending) where the manager is "Graham" and open / Closed is "Open".
Any help would be appreciated:
[TABLE="width: 372"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Manager[/TD]
[TD]Open / Closed[/TD]
[TD]kWh[/TD]
[/TR]
[TR]
[TD]Site 1[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]2,746[/TD]
[/TR]
[TR]
[TD]Site 2[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]2,458[/TD]
[/TR]
[TR]
[TD]Site 3[/TD]
[TD]Graham[/TD]
[TD]Closed[/TD]
[TD]1,643[/TD]
[/TR]
[TR]
[TD]Site 4[/TD]
[TD]Graham[/TD]
[TD]Closed[/TD]
[TD]4,312[/TD]
[/TR]
[TR]
[TD]Site 5[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]3,408[/TD]
[/TR]
[TR]
[TD]Site 6[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]580[/TD]
[/TR]
[TR]
[TD]Site 7[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]1,601[/TD]
[/TR]
[TR]
[TD]Site 8[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]890[/TD]
[/TR]
[TR]
[TD]Site 9[/TD]
[TD]Lee[/TD]
[TD]Open[/TD]
[TD]3,613[/TD]
[/TR]
[TR]
[TD]Site 10[/TD]
[TD]Lee[/TD]
[TD]Closed[/TD]
[TD]4,664[/TD]
[/TR]
[TR]
[TD]Site 11[/TD]
[TD]Brian[/TD]
[TD]Open[/TD]
[TD]4,255[/TD]
[/TR]
[TR]
[TD]Site 12[/TD]
[TD]Paula[/TD]
[TD]Open[/TD]
[TD]525[/TD]
[/TR]
[TR]
[TD]Site 13[/TD]
[TD]Brian[/TD]
[TD]Open[/TD]
[TD]3,529[/TD]
[/TR]
[TR]
[TD]Site 14[/TD]
[TD]Adrian[/TD]
[TD]Open[/TD]
[TD]3,986[/TD]
[/TR]
[TR]
[TD]Site 15[/TD]
[TD]Adrian[/TD]
[TD]Open[/TD]
[TD]2,335[/TD]
[/TR]
[TR]
[TD]Site 16[/TD]
[TD]Graham[/TD]
[TD]Open[/TD]
[TD]914[/TD]
[/TR]
[TR]
[TD]Site 17[/TD]
[TD]Adrian[/TD]
[TD]Open[/TD]
[TD]1,541[/TD]
[/TR]
[TR]
[TD]Site 18[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]4,026[/TD]
[/TR]
[TR]
[TD]Site 19[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]3,660[/TD]
[/TR]
[TR]
[TD]Site 20[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]3,628[/TD]
[/TR]
[TR]
[TD]Site 21[/TD]
[TD]Phil[/TD]
[TD]Closed[/TD]
[TD]1,506[/TD]
[/TR]
[TR]
[TD]Site 22[/TD]
[TD]Phil[/TD]
[TD]Open[/TD]
[TD]1,211[/TD]
[/TR]
</tbody>[/TABLE]