Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default highlighting and sorting

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..

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default highlighting and sorting

I would try this pseudo code:

set rng=range("A1").currentregion assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
if c.offset(1,0)<c then
c.offset(0,1).interior.color=vbyellow
c.offset(0,2)=1
end if
end if
next c

set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc

On Mar 9, 12:10*pm, kokhong wrote:
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..


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default highlighting and sorting

PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..

"PY & Associates" wrote:

I would try this pseudo code:

set rng=range("A1").currentregion assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
if c.offset(1,0)<c then
c.offset(0,1).interior.color=vbyellow
c.offset(0,2)=1
end if
end if
next c

set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc

On Mar 9, 12:10 pm, kokhong wrote:
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..



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default highlighting and sorting

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?

"kokhong" wrote:

PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..

"PY & Associates" wrote:

I would try this pseudo code:

set rng=range("A1").currentregion assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
if c.offset(1,0)<c then
c.offset(0,1).interior.color=vbyellow
c.offset(0,2)=1
end if
end if
next c

set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc

On Mar 9, 12:10 pm, kokhong wrote:
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..



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default highlighting and sorting

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...

"kokhong" wrote:

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?

"kokhong" wrote:

PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..

"PY & Associates" wrote:

I would try this pseudo code:

set rng=range("A1").currentregion assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
if c.offset(1,0)<c then
c.offset(0,1).interior.color=vbyellow
c.offset(0,2)=1
end if
end if
next c

set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc

On Mar 9, 12:10 pm, kokhong wrote:
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..




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default highlighting and sorting

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"

On Mar 9, 3:18*pm, kokhong wrote:
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...



"kokhong" wrote:
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?


"kokhong" wrote:


PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..


"PY & Associates" wrote:


I would try this pseudo code:


set rng=range("A1").currentregion * * *assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") * *both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
* *if c.offset(1,0)<c then
* * * c.offset(0,1).interior.color=vbyellow
* * * c.offset(0,2)=1
* *end if
end if
next c


set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc


On Mar 9, 12:10 pm, kokhong wrote:
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..- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default highlighting and sorting

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" wrote:

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"

On Mar 9, 3:18 pm, kokhong wrote:
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...



"kokhong" wrote:
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?


"kokhong" wrote:


PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..


"PY & Associates" wrote:


I would try this pseudo code:


set rng=range("A1").currentregion assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
if c.offset(1,0)<c then
c.offset(0,1).interior.color=vbyellow
c.offset(0,2)=1
end if
end if
next c


set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc


On Mar 9, 12:10 pm, kokhong wrote:
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..- Hide quoted text -


- Show quoted text -


.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default highlighting and sorting

On Mar 9, 5:16*pm, kokhong wrote:
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" wrote:
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"


On Mar 9, 3:18 pm, kokhong wrote:
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....


"kokhong" wrote:
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?


"kokhong" wrote:


PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..


"PY & Associates" wrote:


I would try this pseudo code:


set rng=range("A1").currentregion * * *assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") * *both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
* *if c.offset(1,0)<c then
* * * c.offset(0,1).interior.color=vbyellow
* * * c.offset(0,2)=1
* *end if
end if
next c


set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc


On Mar 9, 12:10 pm, kokhong wrote:
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..- Hide quoted text -


- Show quoted text -


.- Hide quoted text -


- Show quoted text -


Did you sort columns B and C in ascending order first please?
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default highlighting and sorting

On Mar 9, 5:16*pm, kokhong wrote:
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" wrote:
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"


On Mar 9, 3:18 pm, kokhong wrote:
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....


"kokhong" wrote:
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?


"kokhong" wrote:


PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..


"PY & Associates" wrote:


I would try this pseudo code:


set rng=range("A1").currentregion * * *assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") * *both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
* *if c.offset(1,0)<c then
* * * c.offset(0,1).interior.color=vbyellow
* * * c.offset(0,2)=1
* *end if
end if
next c


set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc


On Mar 9, 12:10 pm, kokhong wrote:
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..- Hide quoted text -


- Show quoted text -


.- Hide quoted text -


- 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.
  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default highlighting and sorting



"PY & Associates" wrote:

On Mar 9, 5:16 pm, kokhong wrote:
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" wrote:
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"


On Mar 9, 3:18 pm, kokhong wrote:
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....


"kokhong" wrote:
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?


"kokhong" wrote:


PY & Associates, how to use this pseudo code?in macro?do you mind to list
down..


"PY & Associates" wrote:


I would try this pseudo code:


set rng=range("A1").currentregion assume data at top left of
worksheet
rng.sort key1:=range("B2"), key2:= range("C2") both ascending,
label present
set rng=range("B2:B" & range("B2").end(xldown).row)
for each c in rng
if c.offset(1,0)<"" then
if c.offset(1,0)<c then
c.offset(0,1).interior.color=vbyellow
c.offset(0,2)=1
end if
end if
next c


set rng=range("A1").currentregion
rng.sort key1:=rnage("D2") desc


On Mar 9, 12:10 pm, kokhong wrote:
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..- Hide quoted text -


- Show quoted text -


.- Hide quoted text -


- 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.
.
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic sorting (giving max and min) based on custom sorting lis Joe Lewis[_2_] Excel Worksheet Functions 4 November 23rd 08 05:12 AM
Sorting data by highlighting? Jonathan Excel Discussion (Misc queries) 1 January 24th 08 03:23 PM
Highlighting Ed Excel Discussion (Misc queries) 0 March 8th 07 06:56 PM
Highlighting every other row? Shanfrog Excel Discussion (Misc queries) 3 January 23rd 07 05:02 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM


All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"