Using Excel to analyse server logs

mikekirk

New Member
Joined
Feb 2, 2007
Messages
3
Hi,

I need to use Excel to analyse some server logs, but I'm having trouble getting the data into the format I need. The current data is in a text file (no problem importing that), and it looks something like this

UniqueID Data
8598A XYZ
8598A IUI
8599B WOR
8599B JKM
8599B LOL

I want to transpose it to look like this.

UniqueID Data1 Data 2 Data3 etc.
8598A XYZ IUI
8599B WOR JKM LOL

One of the biggest problems is that each UniqueID may have different numbers of lines associated with it.

Can anyone help?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hello and welcome to The Board.
If it is a manual process that you want:
First split the data into 2 columns, with the headings in row 1.
in C2 enter the formula:
=IF(A2=A1,IF(A2<>A3,2,1),0)
and copy it down to the other rows.
In D2 enter the formula:
=IF(C2=0,A2&"!"&B2,D1&"!"&B2)
and copy it down to the other rows.
You now need to convert columns C and D from formulas to values;
sort on column C descending;
remove the records with 1 or 0 in column C
and then convert column D using text to columns with the delimiter "!".
I hope that I have described that correctly but let me know if it does not work.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top