LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
akullen
 
Posts: n/a
Default sort 2 or more occurrences


Hi

I have an excel sheet that I use as a log for my firewall. I one column
I have all the IP addresses that have been log by the firewall. What i
want to do is to, in a new column, sort the IP's based on number of
occurrences and only listing those with 2 or more occurrences.

The closest I have come is in the attachment. The only problem with
that “solution” is that it cannot handle different IP’s with the same
number of occurrences.

I tried adding the IP’s as decimals to the occurrences but since an IP
can have 12 figures and more that 100 occurrences, i.e. 3 more figures,
and I had to add a trailing 0 to cope with blank cells I broke the 15
figures limit.

Any help would be great.

The excel file looks like this

A1:A12


123.123.123.123
123.123.123.123
123.123.123.123
123.321.321.321
321.321.321.321

123.123.321.321
123.123.321.321
321.321.321.321
123.123.123.321
1.1.1.5

Paste as arrayformula in B2 and drag to B12
{=LARGE(IF(COUNTIF($A$2:$A$12,$A$2:$A$12)=2,COUNT IF($A$2:$A$12,$A$2:$A$12)),SUM(B$1:B1)+1)}

Paste as arrayformula in C2 and drag to C12
{=INDEX($A$2:$A$12,MATCH(B2,COUNTIF($A$2:$A$12,$A$ 2:$A$12),0))}


+-------------------------------------------------------------------+
|Filename: sort 2 or more ocurr.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4607 |
+-------------------------------------------------------------------+

--
akullen
------------------------------------------------------------------------
akullen's Profile: http://www.excelforum.com/member.php...o&userid=32513
View this thread: http://www.excelforum.com/showthread...hreadid=531218

 
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
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 05:06 PM
data sort is not including all columns in sort Tracy Excel Discussion (Misc queries) 1 October 4th 05 12:16 AM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
"-" ignored in sort Mike H Excel Discussion (Misc queries) 8 January 2nd 05 07:48 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 07:42 PM.

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

About Us

"It's about Microsoft Excel"