Results 1 to 10 of 10

Creating List of Data from Multiple Worksheets

Threaded View

narrowgate88 Creating List of Data from... 05-13-2009, 11:05 AM
vikas.bhandari Re: Creating List of Data... 05-13-2009, 11:50 AM
narrowgate88 Re: Creating List of Data... 05-13-2009, 12:25 PM
Special-K Re: Creating List of Data... 05-13-2009, 07:47 PM
vikas.bhandari Re: Creating List of Data... 05-14-2009, 08:07 AM
narrowgate88 Re: Creating List of Data... 05-14-2009, 09:31 AM
vikas.bhandari Re: Creating List of Data... 05-14-2009, 09:36 AM
narrowgate88 Re: Creating List of Data... 05-14-2009, 09:48 AM
vikas.bhandari Re: Creating List of Data... 05-15-2009, 01:35 AM
narrowgate88 Re: Creating List of Data... 05-18-2009, 09:37 AM
  1. #1
    Forum Contributor
    Join Date
    05-13-2009
    Location
    Lincoln, IL
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    237

    Question Creating List of Data from Multiple Worksheets

    I am trying to create a list of residents, unit types, and unit numbers. I have 3 problems with the following code.

    1) The code ignores sheets that have no value in the specified cell. I need it to return a blank cell for those in order to keep the data in each column matched with the sheet it came from.
    2) The code includes data from hidden sheets. I only want to list data from unhidden sheets. And more specifically, I want to omit data from unhidden sheets that have their tab colored black.
    3) The code includes data from the sheet named "Totals" which I thought I was telling it to ignore.



        Dim WS As Worksheet
         
        Application.ScreenUpdating = False
        Sheets("Resident List by Unit").Activate
         
            For Each WS In Worksheets
                If WS.Name <> "Resident List by Unit" And WS.Name <> "Totals" Then
                WS.Range("b4").Copy
                ActiveSheet.Paste Range("A65536").End(xlUp).Offset(1, 0)
                End If
        Next WS
        
            For Each WS In Worksheets
                If WS.Name <> "Resident List by Unit" And WS.Name <> "Totals" Then
                WS.Range("b5").Copy
                ActiveSheet.Paste Range("b65536").End(xlUp).Offset(1, 0)
                End If
        Next WS
        
            For Each WS In Worksheets
                If WS.Name <> "Resident List by Unit" And WS.Name <> "Totals" Then
                WS.Range("b3").Copy
                ActiveSheet.Paste Range("c65536").End(xlUp).Offset(1, 0)
                End If
       Next WS
           
        Application.ScreenUpdating = True
    
    End Sub
    Last edited by narrowgate88; 05-18-2009 at 09:38 AM.

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