+ Reply to Thread
Results 1 to 6 of 6

Listing different sheets, but does not read all values

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    lux
    MS-Off Ver
    Excel 2007
    Posts
    4

    Question Listing different sheets, but does not read all values

    Hi all,
    I am new to this forum but not completly new to Excel and VBa.
    I am having a small problem with the following code and this is the story.
    I have 4 worksheets all having the same columns and columns titles, but the data in the rows is different.
    What I want is to have a Master List, where all 4 worksheets are listed without spaces and without the title row
    On the Master list the title row is row 2 and on all other 4 sheets it is row 1.
    The problem so far is that it works, but it only copies the title row and the first row of each of the 4 worksheets....

    Can someone please help me!!!

    PS this is the first phase, additionally I would like to be able to tell Excel how many worksheets he should read before stopping.


    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    04-18-2013
    Location
    lux
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Listing different sheets, but does not read all values

    PLEASE it is very urgent....

  3. #3
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Listing different sheets, but does not read all values

    Hi,

    it should work... maybe you don't have data in all rows in column AB? When you are adding value to the variable Rng, you are looking at the last used row of column AB.
    Please Login or Register  to view this content.
    If there's not always data there, maybe you should look at column A. Like this:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-18-2013
    Location
    lux
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Listing different sheets, but does not read all values

    Ahhhh thats it thx!

    Less urgent, but maybe you know it.
    How can I solve the problem if I want Excel to only read specific worksheets and do the same?

  5. #5
    Registered User
    Join Date
    04-18-2013
    Location
    lux
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Listing different sheets, but does not read all values

    indeed it works, but it still copies the title from each worksheet and I don't want nor need that

    Quote Originally Posted by RHCPgergo View Post
    Hi,

    it should work... maybe you don't have data in all rows in column AB? When you are adding value to the variable Rng, you are looking at the last used row of column AB.
    Please Login or Register  to view this content.
    If there's not always data there, maybe you should look at column A. Like this:
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Listing different sheets, but does not read all values

    indeed it works, but it still copies the title from each worksheet and I don't want nor need that
    Title = row one? It shouldn't do that, unless you only have one row and no data in the worksheet.

    As for only copying specific worksheets, something like this should work. Change the value of the SheetNames variable to your real worksheet names.
    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