Results 1 to 10 of 15

Thread: Meger multiple file but header not same

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    If it's not in the first row, how we can identify that in which row the header is ?

    In the meantime place these line above the error line.

    Code:
    Do While Application.WorksheetFunction.CountA(.Rows(1)) = 0
        .Rows(1).Delete
    Loop
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  2. #2
    Junior Member
    Join Date
    Oct 2012
    Posts
    8
    Rep Power
    0

    Meger multiple file but header not same

    The header is in the first row of all workbook but heading is different in some of workbook.
    I have pasted updated line of coding but again getting following error:-


    Runt-time error '9'
    subcript out of range

    Below is line of error

    k(n, j) = d(r, c)


    Quote Originally Posted by Admin View Post
    If it's not in the first row, how we can identify that in which row the header is ?

    In the meantime place these line above the error line.

    Code:
    Do While Application.WorksheetFunction.CountA(.Rows(1)) = 0
        .Rows(1).Delete
    Loop

Similar Threads

  1. Replies: 1
    Last Post: 06-07-2013, 10:32 AM
  2. Loop Through And Delete Multiple File Types In A Folder
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 03-30-2013, 04:47 PM
  3. Replies: 1
    Last Post: 03-07-2013, 11:42 AM
  4. Consolidate multiple workbooks from a folder into one master file VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 4
    Last Post: 02-26-2013, 09:00 PM
  5. Sort Data When a Header Is Clicked
    By Rasm in forum Excel Help
    Replies: 9
    Last Post: 08-01-2012, 06:46 AM

Posting Permissions

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