Results 1 to 24 of 24

Vba to create report

Threaded View

phbryan Vba to create report 03-07-2018, 12:01 PM
Mumps1 Re: Vba to create report 03-07-2018, 01:11 PM
phbryan Re: Vba to create report 03-08-2018, 12:36 PM
Mumps1 Re: Vba to create report 03-08-2018, 12:58 PM
phbryan Re: Vba to create report 03-08-2018, 01:49 PM
Mumps1 Re: Vba to create report 03-08-2018, 01:56 PM
phbryan Re: Vba to create report 03-08-2018, 02:22 PM
Mumps1 Re: Vba to create report 03-08-2018, 03:24 PM
phbryan Re: Vba to create report 03-09-2018, 11:25 AM
Mumps1 Re: Vba to create report 03-09-2018, 03:25 PM
phbryan Re: Vba to create report 04-11-2018, 11:59 AM
Mumps1 Re: Vba to create report 04-12-2018, 01:15 PM
phbryan Re: Vba to create report 04-12-2018, 01:36 PM
Mumps1 Re: Vba to create report 04-12-2018, 02:28 PM
phbryan Re: Vba to create report 04-12-2018, 02:33 PM
Mumps1 Re: Vba to create report 04-12-2018, 03:00 PM
phbryan Re: Vba to create report 04-12-2018, 03:02 PM
Mumps1 Re: Vba to create report 04-12-2018, 03:10 PM
phbryan Re: Vba to create report 04-12-2018, 03:19 PM
Mumps1 Re: Vba to create report 04-13-2018, 09:09 AM
phbryan Re: Vba to create report 04-13-2018, 01:19 PM
Mumps1 Re: Vba to create report 04-13-2018, 01:50 PM
phbryan Re: Vba to create report 04-17-2018, 08:47 AM
Mumps1 Re: Vba to create report 04-17-2018, 10:08 AM
  1. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

    Re: Vba to create report

    Try:
    Sub CreateReport()
        Application.ScreenUpdating = False
        Dim LastRow As Long
        LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
        Dim sDate As String
        Dim eDate As String
        sDate = InputBox("Please enter the start date in format mm/dd/yyyy", "Enter Start Date", "mm/dd/yyyy")
        eDate = InputBox("Please enter the end date in format mm/dd/yyyy", "Enter End Date", "mm/dd/yyyy")
        ActiveSheet.ListObjects("Table_Query_from_MS_Access_Database3").Range. _
            AutoFilter Field:=3, Criteria1:=">=" & CDate(sDate), Operator:=xlAnd, Criteria2:="<=" & CDate(eDate)
        Range("C1") = WorksheetFunction.Min(Range("D12:D" & LastRow).SpecialCells(xlCellTypeVisible))
        Range("C2") = WorksheetFunction.Max(Range("D12:D" & LastRow).SpecialCells(xlCellTypeVisible))
        Range("C3") = WorksheetFunction.Average(Range("D12:D" & LastRow).SpecialCells(xlCellTypeVisible))
        Application.ScreenUpdating = True
    End Sub
    Last edited by Mumps1; 03-07-2018 at 01:33 PM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create a running total - create a "pretty" report
    By excelnewbie1234567 in forum Excel General
    Replies: 1
    Last Post: 03-08-2017, 11:41 AM
  2. VBA the best way to create report?
    By ClareLou in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-13-2016, 05:27 AM
  3. [SOLVED] How to create this report
    By sarahqputra in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-17-2014, 02:12 AM
  4. Replies: 2
    Last Post: 06-29-2011, 04:35 PM
  5. Create a Report
    By bhallam in forum Access Tables & Databases
    Replies: 5
    Last Post: 03-18-2011, 03:21 PM
  6. Create Report
    By Ken@Excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2009, 07:40 AM
  7. trying to create a report
    By BudS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-02-2006, 09:30 AM

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