Macro Help - web logs

CybGeek

New Member
Joined
Nov 12, 2019
Messages
2
Complete Macro noob here...
I am working with a very large data set (5,000+ rows, 57 columns) of web server logs. These logs contain a great deal of noise I need cleaned out. The best column to do this from would be the Destination IP addresses. There are over 250 unique addresses. I need to strip out 137 unique addresses and the entire row associated with each to isolate specific browsing behavior. I figured a vlookup from another sheet would work. But I'm not positive.
The format of this column is as follows:

DestinationIP
DestIP="111.222.133.44"
DestIP="33.44.66.77"
DestIP="125.89.143.23"
DestIP="76.945.34.87"
DestIP="45.347.33.89"
DestIP="44.3.22.454"
DestIP="130.79.142.56"
DestIP="87.56.23.17"
DestIP="52.34.576.34"
DestIP="53.55.123.45"

<tbody>
</tbody>

(Disclaimer: These are random made up IPs, most of which are not in valid format to protect privacy).
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,466
Office Version
365
Platform
Windows
Do you have a list of the IP addresses you are interested in?
 

CybGeek

New Member
Joined
Nov 12, 2019
Messages
2
Do you have a list of the IP addresses you are interested in?
I gave mock addresses. I can change those myself in the code. I just don't know how to write/form an adequate script that will take out 137 addresses + the associated row in order to clean up this data and make it more readable for an analyst.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,466
Office Version
365
Platform
Windows
You could probably do this without code.

For a start you could use a MATCH formula to check the IPs in the Destination IP address columns against the list of IPs you want to keep.

You could then filter on that column to exclude IPs that don't match and copy the returned rows to another sheet.
 

Watch MrExcel Video

Forum statistics

Threads
1,089,943
Messages
5,411,414
Members
403,368
Latest member
Cyril18

This Week's Hot Topics

Top