?
Solved

Removing group of repetitive rows from large excel file.

Posted on 2007-10-19
6
Medium Priority
?
1,329 Views
Last Modified: 2008-02-26
I have to prepare some files for our friendly neighborhood auditor. These files are generated by our month end procedure in Accpac Plus for DOS.

Two files are generated: an AP (purchases and expenses) file and a OE (sales) file.

Basically what I need to do is take these 24 total text files and open them with Excel and set them up so totals for GL accounts can be viewed easily etc etc.

My problem is that Accpac generates these files with page headers. Each file must have at least 100 pages so when I open them in excel I get the date, page number and column headers every 60 rows or so.

It wouldn't be so bad if these page headers occupied a single line but they span about 8 or 9 lines.

What's the quickest and least painful way I can remove these lines either in Notepad, Word or Excel?

Thanks.
0
Comment
Question by:Mescronomicon
  • 4
6 Comments
 
LVL 17

Expert Comment

by:gtgloner
ID: 20110114
Could you post an example of what you see when you have your file in Excel?
0
 
LVL 3

Author Comment

by:Mescronomicon
ID: 20110404
Date: Dec 02 2004    3:22pm                           XXXXXXXXXXXXXXXXXXX                                             Page:   1
G/L Transactions

Report information in detail.
Sort G/L transactions by account.

                          Entry                                                                      
 Acct.  Dept. Date          No. Src.Code Reference    Description                              Debit          Credit

10x000        Nov 01 2004     8 AP - MC  CONSEILLER I     3-   3-    1        xxxxx                       xx,xxx.xx
              Nov 01 2004     9 AP - MC  ZENTIL-BRATT     3-   3-    2        xxxxxx                      xx,xxx.xx
              Nov 01 2004    10 AP - MC  GWL REALTY A     3-   3-    3        xxxxxx                        xx,xxx.xx
              Nov 01 2004    11 AP - MC  GROSVENOR CA     3-   3-    4        xxxxx                      xx,xxx.xx
0
 
LVL 3

Author Comment

by:Mescronomicon
ID: 20110407
It's aligns however in the actual document.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:Mescronomicon
ID: 20110977
This is the stuff that repeats every 60 rows or so:


Date: Dec 02 2004    3:22pm                           XXXXXXXXXXXXXXXXXXX                                             Page:   1
G/L Transactions

Report information in detail.
Sort G/L transactions by account.

                          Entry                                                                      
 Acct.  Dept. Date          No. Src.Code Reference    Description                              Debit          Credit


0
 
LVL 24

Accepted Solution

by:
R_Rajesh earned 2000 total points
ID: 20111330
Code assumes that the header always starts with "Date:" and spans eight rows...

Sub Test()
Dim c As Range, rng As Range
With Cells
    Set c = .Find("Date:", LookIn:=xlFormulas)
    If Not c Is Nothing Then
        firstAddress = c.Address
        Do
            If rng Is Nothing Then Set rng = Rows(c.Row & ":" & c.Row + 7)
            Set rng = Union(rng, Rows(c.Row & ":" & c.Row + 7))
            Set c = .FindNext(c)
        Loop While Not c Is Nothing And c.Address <> firstAddress
    End If
End With
rng.Delete
End Sub
0
 
LVL 3

Author Comment

by:Mescronomicon
ID: 20111925
Awesome! Worked like a charm, thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question