Results 1 to 13 of 13

How to create a summary (categorized) report from a table

Threaded View

  1. #9
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,957

    Re: How to create a summary (categorized) report from a table

    Your setup is not really condusive to your requirement...
    See result sheet...Headings are in order of census sheet...so perhaps change accordingly...
    Sub J3v16()
    Dim Data, Temp, Arr, Crit As String, i As Long, ii As Long, x As Long
    Arr = [{8,9,10,11,12,13,14,15,20,21,22,23,24,25,26,27,28,29}]
    Data = Sheets("census").ListObjects(1).Range
    ReDim Temp(1 To UBound(Data), 1 To 18)
    For i = 2 To UBound(Data)
        If Data(i, 3) <> "" Then
            Crit = Data(i, 3) & " Bed " & Data(i, 1)
            x = x + 1
            For ii = 1 To UBound(Arr)
                If Data(i, Arr(ii)) <> "" Then
                    Temp(x, ii) = IIf(IsDate(Data(i, Arr(ii))), Crit & " " & Data(i, Arr(ii)), Crit)
                End If
            Next ii
        End If
    Next i
    With Sheets("Result") '! For testing purposes...
        .Rows(2 & ":" & .Rows.Count).Delete
        .Cells(2, 1).Resize(x, 18) = Temp
        .UsedRange.Columns.AutoFit
    End With
    With Sheets("Charge Report") '! Change headings accordingly...
        .Rows(4 & ":" & .Rows.Count).Delete
        .Cells(4, 2).Resize(x, 18) = Temp
        .UsedRange.Columns.AutoFit
    End With
    End Sub
    Attached Files Attached Files
    Last edited by Sintek; 08-19-2024 at 03:53 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to create a summary 'report'?
    By Mr Davo in forum Excel General
    Replies: 3
    Last Post: 12-14-2015, 08:42 PM
  2. [SOLVED] How to create a summary report from several files???
    By Arty_1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-13-2014, 08:03 AM
  3. Trying to Create a Summary Report
    By Mcrawiva in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-02-2013, 09:39 PM
  4. Is it possible to create a summary report?
    By Huddle in forum Excel General
    Replies: 5
    Last Post: 08-20-2010, 03:37 PM
  5. How to create summary of expense report?
    By Barb R. in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2010, 10:44 AM
  6. [SOLVED] not able to create subtotal summary report
    By Ron Desrosiers in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-21-2006, 07:40 PM
  7. How to create summary of expense report?
    By KAE1994 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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