Hello,

 

Try :

 

Sub test1()

Dim Enrgt As String

Close #1

Close #2

mypath = "d:\donnees\daniel\mpfe\" 'files path, please change

Open mypath & "RPTbamCommon Maintenance201106061432493.txt" For Input As #1

Open mypath & "Output.txt" For Output As #2

Do While Not EOF(1)

    Line Input #1, Enrgt

    If Left(Enrgt, 1) = "-" Or Left(Enrgt, 1) = " " Or Left(Enrgt, 1) = "B"
Or _

    Len(Enrgt) = 0 Then

        Print #2, Enrgt

    End If

Loop

Close #2

End Sub

 

Regards.

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de uzoma ojemeni
Envoyé : dimanche 19 juin 2011 13:06
À : excel-macros@googlegroups.com
Objet : $$Excel-Macros$$ HELP: Macro to PARSE Lines of Data

 

Dear Friends,

See attached. I need help in developing an excel macro that can delete the
below lines of text

+++    HW-Airbridge        2011-06-06 14:31:47
O&M    #2238404
"%%DSP CBTSCFG: BTSID=200, CFGID=CBTSSECTORCARRIER;%%"
RETCODE = 0  Execution succeeded

BTS SECTOR CARRIER CONFIGURATION
--------------------------------
(Number of results = 15)

#NAME?

+++    HW-Airbridge        2011-06-06 14:31:47
O&M    #2238405
"%%DSP CBTSCFG: BTSID=200, CFGID=CBTSSECTORCARRIER;%%"
RETCODE = 0  Execution succeeded

BTS SECTOR CARRIER CONFIGURATION
--------------------------------

The expected result should be a table as shown below

 BTS Name              BTS ID   Local Cell ID   Local Sector ID   Carrier ID
TRM ID   CE Pool ID   HPB Flag   PN Sharing Carrier Mode      

 Lekki Ph 2 - 2_SWAP   200      200             0                 10
1        0            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             0                 11
0        1            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             0                 12
1        0            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             1                 10
3        0            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             1                 11
2        1            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             1                 12
3        0            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             2                 10
5        0            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             2                 11
4        1            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      200             2                 12
5        0            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      2200            0                 14
1        4            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      2200            0                 15
0        4            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      2200            1                 14
3        4            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      2200            1                 15
2        4            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      2200            2                 14
5        4            NO         NULL                         
 Lekki Ph 2 - 2_SWAP   200      2200            2                 15
4        4            NO         NULL

I would appreciate a prompt response.

Thank you and keep up the wonderful work.

uzoma

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to