+ Reply to Thread
Results 1 to 13 of 13

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

Hybrid View

  1. #1
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    O365 V2408
    Posts
    15,217

    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!!!

  2. #2
    Registered User
    Join Date
    08-09-2012
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    24

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

    Thank you Sintek, but not quite what I was looking for as far as formatted return results. JeteMc's original solution was exactly what I was looking for as far as how the results returned (except some minor adjustments to produce the desired results) because I need the data to be accumulated and grouped in a summary report format rather than one with blank spaces such as yours.

    Also in response to your subsequent post, yes...the formula that JeteMc provided me is extensive and complicated, but my data set will not grow because the Charge Report (which is a summary report of the Census worksheet) is only extracting data from a max of 40 possible records at any given time based on the Census worksheet, so it is self-limiting.

    I am grateful and appreciative for your attention and time in coming up with another solution to my problem.

  3. #3
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    492

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

    Hi

    ..so did you look at my post#9 above???
    ..did you check my formula changes to fix your falling short issue??
    ..and I also added a formula to include the patient, bed, date in the Foley section as you requested.

    zeddy

  4. #4
    Registered User
    Join Date
    08-09-2012
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    24

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

    Hi zzzeddy,
    So sorry, I replied to your post but didn't realize that it didn't post for some reason. Yes, your modified formulas were exactly what I needed. The inclusion of the date in that format works nicely. Thank you so much.

+ 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. 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. [SOLVED] 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. 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