Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Log File CleanUp

Hi,

I have been asked to prepare a report from a log file (.xls) that
reports 34 User activities. The current time and date values are
formatted like this...

LineNo User Activity Value
2 DoeJ sessionSTART at 10:46:14
3 DoeJ sessionDATE 09-07-2004
38 DoeJ sessionENDtime 10:51:44
40 DoeJ sessionSTART at 10:56:07
41 DoeJ sessionDATE 09-07-2004
76 DoeJ sessionENDtime 10:56:24
77

... but I would like to report them like this ...


LineNo User Activity Value
2 DoeJ sessionStart at 09-07-2004 10:46:14
38 DoeJ sessionEnd at 09-07-2004 10:51:44
40 DoeJ sessionStart at 09-07-2004 10:56:07
76 DoeJ sessionEnd at 09-07-2004 10:56:24
Any help you can offer would be appreciated.

- Henry

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Log File CleanUp

Henry,

Assuming your log file has a tab called Log where the data is contained,
and the first row in that tab is the headers, this should work. If not,
please substitute the correct worksheet and cell references for the process
to start.

Sub Combine_Log()
Worksheets("Log").Activate
Cells(1, 1).Select
ActiveCell.CurrentRegion.Name = "mylog"
Range("mylog").Cells(2, 1).Select
Do While ActiveCell.Value < xlnull
ActiveCell.Offset(0, 3).Value = ActiveCell.Offset(1, 3).Value _
+ ActiveCell.Offset(0, 3).Value
ActiveCell.Offset(2, 3).Value = ActiveCell.Offset(2, 3).Value _
+ ActiveCell.Offset(0, 3).Value
ActiveCell.Offset(1, 0).EntireRow.Delete
ActiveCell.Offset(2, 0).Select
Loop
Range("mylog").Cells(1, 4).EntireColumn.NumberFormat = "[$-409]mm-dd-yy
h:mm:ss"
End Sub

" wrote:

Hi,

I have been asked to prepare a report from a log file (.xls) that
reports 34 User activities. The current time and date values are
formatted like this...

LineNo User Activity Value
2 DoeJ sessionSTART at 10:46:14
3 DoeJ sessionDATE 09-07-2004
38 DoeJ sessionENDtime 10:51:44
40 DoeJ sessionSTART at 10:56:07
41 DoeJ sessionDATE 09-07-2004
76 DoeJ sessionENDtime 10:56:24
77

... but I would like to report them like this ...


LineNo User Activity Value
2 DoeJ sessionStart at 09-07-2004 10:46:14
38 DoeJ sessionEnd at 09-07-2004 10:51:44
40 DoeJ sessionStart at 09-07-2004 10:56:07
76 DoeJ sessionEnd at 09-07-2004 10:56:24
Any help you can offer would be appreciated.

- Henry


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
Data cleanup sjs Excel Worksheet Functions 1 September 16th 09 03:37 PM
Can someone help Cleanup my recorded macro Kelly******** Excel Discussion (Misc queries) 0 April 18th 08 07:51 PM
recently used files, cleanup Patricia Shannon Excel Discussion (Misc queries) 0 April 4th 06 11:19 PM
Windows XP Disc Cleanup Dog Koala New Users to Excel 1 May 27th 05 03:37 PM
Error Handling and Cleanup Shatin Excel Programming 6 February 19th 04 04:28 AM


All times are GMT +1. The time now is 10:49 AM.

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"