I have this started with doing some google searches and the below code works but it is copying the wrong col in my original:
'Copy Sorted TOP 10
Dim i As Long
Dim r As Range
Dim rWC As Range
Set r = Range("D16", Range("D" & Rows.Count).End(xlUp)).SpecialCells(10)
For Each rWC In r
i = i + 1
If i = 10 Or i = r.Count Then Exit For
Next rWC
Range(r(1), rWC).Resize(, 10).SpecialCells(10).Copy
Sheets("Division TOP-BOTTOM 10").Select
Range("TOP_10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
My Data looks like this:
As you can see the A is St#, B is Area, C is blank, D is the COL i want it to highlight the top 10 entries. Right now the code i am using is highlighing this:
It is not selecting the visiable cells but it is selecting 10 cells but selecting A and B col and not D either! I thought i had r= row D in the setup but not a clue why its not selcting correctly.
Major confusion here...
Any help is much appreciated.
Mike
'Copy Sorted TOP 10
Dim i As Long
Dim r As Range
Dim rWC As Range
Set r = Range("D16", Range("D" & Rows.Count).End(xlUp)).SpecialCells(10)
For Each rWC In r
i = i + 1
If i = 10 Or i = r.Count Then Exit For
Next rWC
Range(r(1), rWC).Resize(, 10).SpecialCells(10).Copy
Sheets("Division TOP-BOTTOM 10").Select
Range("TOP_10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
My Data looks like this:
As you can see the A is St#, B is Area, C is blank, D is the COL i want it to highlight the top 10 entries. Right now the code i am using is highlighing this:
It is not selecting the visiable cells but it is selecting 10 cells but selecting A and B col and not D either! I thought i had r= row D in the setup but not a clue why its not selcting correctly.
Major confusion here...
Any help is much appreciated.
Mike