+ Reply to Thread
Results 1 to 3 of 3

Macro to open both .xls and .xlsx to remove rows above header

  1. #1
    Registered User
    Join Date
    03-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Macro to open both .xls and .xlsx to remove rows above header

    Okay... I'm new so bear with me as I try to type what I'm trying to accomplish.

    I have reports that are received each month that have the report details in the rows above the actual header row. These details, such as run time, date, etc. are not needed so I need to remove these rows, pulling the header row to the top along with moving the data up with it.

    Problems:
    - Some files are .xls and some are .xlsx (the process I have now ignores the .xls file for some reason)
    - I'm searching for a key word in the header row but need to search two (can't figure that out) since not all files contain the first word in the header.
    Note: the number of rows above the header in each file varies... some three rows, others have more.

    I found some info on this and tried to modify to search for the second word if the first word was not found. I'm here because it doesn't work. Any help you all could provide would be greatly appreciated.


    Please Login or Register  to view this content.
    Last edited by thevideoguy2; 05-13-2013 at 10:28 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to open both .xls and .xlsx to remove rows above header

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Macro to open both .xls and .xlsx to remove rows above header

    Try this:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1