+ Reply to Thread
Results 1 to 8 of 8

Due date summary page for multiple sheets

Hybrid View

  1. #1
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Due date summary page for multiple sheets

    Try this code - dont you want the name of the project (sheet name) to also show up in the summary?

    Option Explicit
    
    Sub update_summary()
    Dim i As Long, j As Long, lrow As Long, lastrow As Long
    
    Application.ScreenUpdating = False
    
    Worksheets("Summary").Cells.Delete
    Worksheets("Summary").Range("A1").Value = "Overdue"
    
    For i = 1 To Worksheets.Count
        With Worksheets(i)
            If .Name <> "Summary" Then
                lrow = .Range("A" & .Rows.Count).End(xlUp).Row
                If Worksheets("Summary").Range("A2").Value = "" Then .Rows(1).Copy Worksheets("Summary").Range("A2")
                For j = 2 To lrow
                    If .Range("F" & j).Value < Date And .Range("G" & j).Value <> "Complete" Then _
                    .Rows(j).Copy Worksheets("Summary").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
                Next j
            End If
        End With
    Next i
    
    lastrow = Worksheets("Summary").Range("A" & Rows.Count).End(xlUp).Row
    Worksheets("Summary").Range("A" & lastrow + 2).Value = "Due this week"
    
    For i = 1 To Worksheets.Count
        With Worksheets(i)
            If .Name <> "Summary" Then
                lrow = .Range("A" & .Rows.Count).End(xlUp).Row
                If Worksheets("Summary").Range("A" & lastrow + 3).Value = "" Then .Rows(1).Copy Worksheets("Summary").Range("A" & lastrow + 3)
                For j = 2 To lrow
                    If .Range("F" & j).Value >= Date And .Range("F" & j).Value <= Date + 6 And .Range("G" & j).Value <> "Complete" Then _
                        .Rows(j).Copy Worksheets("Summary").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
                Next j
            End If
        End With
    Next i
    
    MsgBox "Done"
    
    Application.ScreenUpdating = True
    
    End Sub

    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  2. #2
    Registered User
    Join Date
    05-29-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Due date summary page for multiple sheets

    HI Arlu

    YOu are a star.

    Just a couple of small things.
    In the overdue column in summary, it isnt picking up a couple of tasks where the status is overdue. I only want it to be ignored if it says complete or hold. This may also apply to the due this week section, only ignore task if says complete or hold.

    Also the columns on the summary sheet are out by one as it doesnt transport the date column which is the date the task was set.

    Are these minor changes that are easy to make?
    Thanks so far :-)

+ 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