highlighting and sorting

  • Thread starter Thread starter kokhong
  • Start date Start date
K

kokhong

is there anyway to do following task:

A B
C
IP Username
hits
10.10.10.1 Lee
10 ---->highlight
10.10.10.22 Lee
5
10.10.10.11 wong
30 ----->highlight
10.10.10.9 wong
15
10.10.10.10 chan
3 ----->highlight

1. highlight all the same user name with highest hits among same user name.
2. highligh all the unique user name. (example chan)
3. sort all the highlight columns to the top.

any way to do this?thanks in your advance..
after sorting
A B
C
IP Username
hits
10.10.10.1 Lee
10 ---->highlight
10.10.10.11 wong
30 ----->highlight
10.10.10.10 chan
3 ----->highlight
10.10.10.22 Lee
5
10.10.10.9 wong
15

if highlighting procedure cannot make it, it is ok..as long as the thing can
be sorted as above,finally.thanks..
 
PY & Associates, now im able to use the information u give me to
highlight..now i only left the last step..how to filter the highlight columns?
 
PY & Associates, it really can make it, now i only know the purpose why do
you add the 1 to D columns..now i can finish my task aldy thanks you...
 
Please take care of the last entry.
If the name is single appearance, you will miss it.

At end of procedure, add "columns(4).clearcontents"
 
PY & associates, just now i recheck my task, i found some problem...
The script you provided me will only highlight the last name only, but
what i want is it will highlight the highest hit within the same name..soli
for bothering you again..just like below example:

A B C
IP username hits
10.10.10.1 Lee 5
10.10.10.5 Lee 30 ------->highlight
10.10.10.2 Lee 15
10.10.10.10 chan 2
10.10.10.9 chan 10 ------->highlight
10.10.10.8 chan 4
 
PY & associates, just now i recheck my task, i found some problem...
The script you provided me will only highlight  the last  name only, but
what i want is it will highlight  the highest hit within the same name...soli
for bothering you again..just like below example:

A                                B                      C
IP                      username            hits
10.10.10.1         Lee                       5
10.10.10.5         Lee                      30        ------->highlight
10.10.10.2         Lee                      15
10.10.10.10       chan                    2
10.10.10.9         chan                     10        ------->highlight
10.10.10.8         chan                       4








- Show quoted text -

Did you sort columns B and C in ascending order first please?
 
PY & associates, just now i recheck my task, i found some problem...
The script you provided me will only highlight  the last  name only, but
what i want is it will highlight  the highest hit within the same name...soli
for bothering you again..just like below example:

A                                B                      C
IP                      username            hits
10.10.10.1         Lee                       5
10.10.10.5         Lee                      30        ------->highlight
10.10.10.2         Lee                      15
10.10.10.10       chan                    2
10.10.10.9         chan                     10        ------->highlight
10.10.10.8         chan                       4








- Show quoted text -

I have looked at the problem again.
It is from the data set itself.
When I copy/paste/text2column, the resulting data set could not be
sorted by two columns.

I deleted the hits column and replaced all numerals, still no joy.

I reconstructed the data set in a blank workbook, it sorted alright.
Once this is done, my logic is correct.

If you cannot overcome the problem, send me your original data.
See if I can assist.
 
PY & Associates said:
I have looked at the problem again.
It is from the data set itself.
When I copy/paste/text2column, the resulting data set could not be
sorted by two columns.

I deleted the hits column and replaced all numerals, still no joy.

I reconstructed the data set in a blank workbook, it sorted alright.
Once this is done, my logic is correct.

If you cannot overcome the problem, send me your original data.
See if I can assist.
.
i get the way u say. i forgot to sort columns C, initially. After listen to ur advise, i sorted column C ascending and then sorted column B ascending. After that adding your code to vba, and run the program. Finally, the result come out as what i need...Thanks for your help.
 
Back
Top