+ Reply to Thread
Results 1 to 7 of 7

How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    256

    How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

    I have a summary sheets for my report that my department no longer wants to use. Rather they want to have a longer, more detailed version of the same thing, but rather than 1 sheet summarizing it all, they want it 1 widget, 1 sheet.

    How can I have my Checksheet tab (see upload), turned into multiple tabs. In the specific example I provided, there are 10 widgets, so therefore I created the result in 10 tabs.

    How can I get a macro to turn Checksheet tab into the next 10 tabs (see excel upload)?

    I have attached the excel sheet of how my summary sheet is, and how it's supposed to look like.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

    Run the macro Inspection_Summaries in the attached file.

    Checksheet.xlsm
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    256

    Re: How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

    Alpha... almost there.

    In my upload, numbers 6-10 on the checksheet summary have an extra line item that says "JPA not provided". That is transcribed at the bottom of the page on their corresponding tabs 6-10 in red again.
    Currently the macro doesn't have it.

    Very good though. It's already a huge improvement over what I have.
    Thank you

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

    Format the Template worksheet's Notes field (A57) with red font.

    Sub Inspection_Summaries()
        
        Dim wsIST As Worksheet: Set wsIST = Sheets("IS Template")   'Inspection Summary Template sheet
        Dim cell As Range, i As Integer
        
        Application.ScreenUpdating = False
        With Sheets("Checksheet")
            For Each cell In .Range("K7", .Range("K" & Rows.Count).End(xlUp))
                If .Range("B" & cell.Row).Value <> "" Then
                    i = 0
                    wsIST.Copy After:=Sheets(Sheets.Count)  'Copy template
                    ActiveSheet.Name = .Range("A" & cell.Row).Value & " - " & .Range("B" & cell.Row).Value
                    Range("F2").Value = .Range("C3").Value               'Inspector Name
                    Range("F3").Value = .Range("F" & cell.Row).Value     'QC Date
                    Range("F4").Value = .Range("D" & cell.Row).Value     'Foreman
                    Range("F5").Value = .Range("G" & cell.Row).Value     'Completed Date
                    Range("F6").Value = .Range("B" & cell.Row).Value     'Structure No.
                    Range("O2").Value = "TD" & .Range("C" & cell.Row).Value     'TD#
                    Range("O3").Value = .Range("E" & cell.Row).Value     'Client
                    Range("O4").Value = "Metro West"                     'Region ???
                    Range("O5").Value = .Range("I3").Value               'District
                    If .Range("H" & cell.Row).Value <> "" Then               'FAIL
                        Range("D16").Value = .Range("K" & cell.Row).Value    'Comments
                        Range("D18").Value = .Range("H" & cell.Row).Value    '1st Problem Code
                    End If
                ElseIf .Range("H" & cell.Row).Value <> "" And i <= 5 Then  'Next problem code
                    i = i + 1   'Problem code counter
                    Range("D16").Offset(i * 8).Value = .Range("K" & cell.Row).Value   'Comments
                    Range("D18").Offset(i * 8).Value = .Range("H" & cell.Row).Value   'Next Problem Code
                Else
                    Range("A57").Value = .Range("K" & cell.Row).Value   'Notes
                End If
            Next cell
            .Select
        End With
        Application.ScreenUpdating = True
        
    End Sub

  5. #5
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    256

    Re: How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

    Thanks. That helped!

  6. #6
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    256

    Re: How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

    AlphaFrog, I have been testing the macro for a while, and there is a few hiccups that I wouldn't have noticed if I didn't test it for a while.

    When I have (for example) more than one row of "notes", it only copies over into the new sheet 1 of those rows. Can you fix that so that it doesn't matter which order the (up to 3 different line items of notes) notes are?

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: How to: Turn Summary Sheet into detailed Sheets (multiple tabs)

    Quote Originally Posted by JPWRana View Post
    AlphaFrog, I have been testing the macro for a while, and there is a few hiccups that I wouldn't have noticed if I didn't test it for a while.

    When I have (for example) more than one row of "notes", it only copies over into the new sheet 1 of those rows. Can you fix that so that it doesn't matter which order the (up to 3 different line items of notes) notes are?
    Sub Inspection_Summaries()
        
        Dim wsIST As Worksheet: Set wsIST = Sheets("IS Template")   'Inspection Summary Template sheet
        Dim cell As Range, i As Integer, j As Integer
        
        Application.ScreenUpdating = False
        With Sheets("Checksheet")
            For Each cell In .Range("K7", .Range("K" & Rows.Count).End(xlUp))
                If .Range("B" & cell.Row).Value <> "" Then
                    i = 0: j = 0
                    wsIST.Copy After:=Sheets(Sheets.Count)  'Copy template
                    ActiveSheet.Name = .Range("A" & cell.Row).Value & " - " & .Range("B" & cell.Row).Value
                    Range("F2").Value = .Range("C3").Value               'Inspector Name
                    Range("F3").Value = .Range("F" & cell.Row).Value     'QC Date
                    Range("F4").Value = .Range("D" & cell.Row).Value     'Foreman
                    Range("F5").Value = .Range("G" & cell.Row).Value     'Completed Date
                    Range("F6").Value = .Range("B" & cell.Row).Value     'Structure No.
                    Range("O2").Value = "TD" & .Range("C" & cell.Row).Value     'TD#
                    Range("O3").Value = .Range("E" & cell.Row).Value     'Client
                    Range("O4").Value = "Metro West"                     'Region ???
                    Range("O5").Value = .Range("I3").Value               'District
                    If .Range("H" & cell.Row).Value <> "" Then               'FAIL
                        Range("D16").Value = .Range("K" & cell.Row).Value    'Comments
                        Range("D18").Value = .Range("H" & cell.Row).Value    '1st Problem Code
                    End If
                ElseIf .Range("H" & cell.Row).Value <> "" And i <= 5 Then  'Next problem code
                    i = i + 1   'Problem code counter
                    Range("D16").Offset(i * 8).Value = .Range("K" & cell.Row).Value   'Comments
                    Range("D18").Offset(i * 8).Value = .Range("H" & cell.Row).Value   'Next Problem Code
                Else
                    Range("A57").Offset(j).Value = .Range("K" & cell.Row).Value   'Notes
                    j = j + 1
                End If
            Next cell
            .Select
        End With
        Application.ScreenUpdating = True
        
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 01-15-2014, 12:47 PM
  2. [SOLVED] Summary sheet - copy cell contents from multiple sheets to one summary sheet
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 10:32 AM
  3. Create a summary from multiple sheets on a master/summary sheet
    By detribus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2012, 08:04 PM
  4. Using checkboxes on summary sheet to name tabs and hide/unhide tabs
    By eew2201 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2012, 06:13 PM
  5. Copying a template sheet and putting those multiple sheets data into a summary sheet
    By John Wolfe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-18-2011, 06:29 PM

Tags for this Thread

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