+ Reply to Thread
Results 1 to 18 of 18

Run a report based on a tag in a cell?

  1. #1
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Question Run a report based on a tag in a cell?

    I am going to make this as detailed as I possibly can because I know there is someone way smarter than me that could make this happen without even thinking about it. And to you, dear friend, I thank you in advance.

    I want to be able to run a report based on a tag in a cell. I think that's the best way to describe it.

    My sheet has a list of rooms of residents in a nursing home. Each resident gets a shower twice a week. The schedule is based by room number, not name, so that's why I want to tag the cell of the room number. I've attached a sample of the sheet. I was able to figure out how to use check boxes to create an automatic census of who is in/who is out, so I'm getting greedy and hoping I can do this too.

    There are 14 possible shower times. Two times per day (AM/PM) for each day of the week. So I was thinking I could assign a tag for each shower the person gets. Say they get a shower Mon AM and Fri PM. Mon AM tag is "1". Fri PM tag is "10". Another person also gets a shower on Fri PM, so he has the tag "10" as well. (I need the tag attached to the room number, not the name, because sadly the names change often. The room numbers and their assigned shower times do not change, however).

    I ask excel to run a report of the "10" tags. Those two would appear on the list, because they have "10" as a tag.

    It would be even more awesome and amazing if the report could understand that the person is not in (based on my check box coolness). In other words if the "in" box is un-checked, it would know they are out, and leave them off the report (even if it technically was their shower day).

    Does this make sense? I'm sure I'm using the wrong terminology, but I know this must be possible.

    If I can do anything to help make it clearer please just ask, and thank you again!

    Signed,

    Nurse Dummy
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,234

    Re: Run a report based on a tag in a cell?

    Welcome to the Forum BadDogJay!

    I don't think we have a super hard problem here but I need a little clarification.

    Why are the same room numbers repeated, with the same data? I see 101 repeated 6 times with Papa Smurf.

    You have nothing in your file showing where you would pick the shower times, or what you want the report to look like. What is the purpose of your report? Are you trying to give staff a schedule so they can, for example, see who gets showers today?

    Is there any limit for how many residents you can schedule for a shower in the same time slot? Your example shows two people in 10, but I assume there must be some limit.

    Also you are making liberal use of merged cells. I cannot express strongly enough how much of a problem this can be. I see no benefit to how they were used in this sheet. I have shown a redesign that doesn't need them. I did leave the merged rows in column E since it's just text, but still suboptimal.

    As a start I have added two shower times in the RM# column for each room. To do the report I need more input from you on what you want it to look like, and I will have to review what functions are available in your version of Excel.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,369

    Re: Run a report based on a tag in a cell?

    I had a different understanding of the request, although Jeff's proposal seems quite good.
    1. Columns U:W displays a list of shower numbers and times
    2. Columns Z:AB display shower numbers assigned per room
    3. Column Y displays In/Out and is populated using: =IF(INDEX(B$9:B$80,MATCH(Z3,B$4:B$75,0))=TRUE,"In","Out")
    4. Cells S4:S15 display the room numbers associated with the tag in cell S3 using: =IFERROR(INDEX(Z$3:Z$28,AGGREGATE(15,6,(ROW(C$4:C$75)-ROW(C$3))/(AA$3:AB$28=S$3)/(Y$3:Y$28="In"),ROWS(S$4:S4))),"")
    Note that the check boxes in cells B62:B80 do not work.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    Thank you for replying so fast!

    I should have mentioned I am the overnight nurse in charge of updating this report every night. It gets printed and distributed to various units. Throughout the day, the nurses hand-write in the "6-2, 2-10,10-6" columns. The only time the sheet will actually have any change to it is when I change the "documentation" column. That gets updated each night based on what has been hand-written on the paper copy. And it is only text, not data.

    They were using a Word document for this but it is horrendous and I'm trying to modernize just a little. I threw in the "census" check boxes so I didn't have to manually keep track.

    As far as the showers:

    This is a separate report that gets printed & handed to the nurses aides. Shower information cannot appear on the main sheet. But, I thought I would take advantage of the fact that I have all the resident information in a format that can generate this report instead of me having to hand-write it every night.

    I hope that makes sense -- I will be printing the shower information with room #, resident name, and shower time for each day separate from this sheet and physically distributing it. It's fine for the report to appear on a separate sheet within the workbook.

    There are 4 units, each with AM and PM showers, and it ranges from 3 residents per shower to 9.

    I haven't input the shower data anywhere because frankly I have no idea how to go about it. But currently, I look at the pre-dertermined schedule broken down by day, room number, and AM or PM. Then I have to either type or write it out.

    As far as the duplicate Papa & Mrs. Smurfs, I accidentally duplicated page 1. A lot. Oops. There are about 30-40 residents per unit, and there are 4 units, so each unit will have their own page like this.

    Does that help clarify things?

    The reason I want to make this work is because if I can figure this out, I won't have to re-do everything when a resident "moves out"....

    Thank you again!
    Last edited by BadDogJay; 07-04-2025 at 12:03 PM.

  5. #5
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    Thank you so much - how do I turn this into a printable report of the room #, name, and shower time?

    I am super lost but I want to learn.

    Again I appreciate your help & patience.

    -Nurse D.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,369

    Re: Run a report based on a tag in a cell?

    To convert this to a printable report I feel that we need to modify the format of the Nursing Home sheet, however first take a look at the attached file and see if it is closer to what you envision.
    1. Output sheet has tag #, day and time in row 3
    2. Room numbers and names in rows 4:15
    3. The data needed to support the output is on the Data sheet which could be hidden
    Let us know if you have any questions.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,369

    Re: Run a report based on a tag in a cell?

    Thinking about this a bit more I feel that putting only the data needed for the shower report on the Data sheet and doing away with the Nursing Home sheet would work best.
    Attached is a sample.
    Note that the In/Out designation is accomplished using drop downs instead of check boxes as I feel drop downs are easier to work with.
    Let us know if you have any questions.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    Whatever you think works best is great with me!

    So just to be clear: this still works even if it is a separate worksheet from my main document? It will still know if the person is in or not?

    I don't care about changing the check box format, I just want to make sure I don't have to keep track of them in both sheets. The census of who is in/out needs to be on the main printable sheet, and I was hopeful the shower report could automatically grab that data (in other words I don't want to manually keep track of the census in two different spots).

    Also I uploaded the worksheet with a new sheet called "Perfect World" which shows how I want to be able to print the data. But that might be something I could do with a pivot table? My pivot table knowledge consists of 3 YouTube videos I've watched so take that for what it's worth.

    Thank you!!!
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,369

    Re: Run a report based on a tag in a cell?

    See if this is set up correctly.
    On the Perfect World sheet cells A3 and C3 are the tag numbers. The values in those cells could be hidden by changing the font to white.
    On the Nursing Home sheet cells in the range B9:B80 that previously contained check boxes now contain drop downs.
    On the Data sheet the actual room numbers and tag numbers will need to be manually filled in (a process that should need to be done only once).
    Let us know if you have any questions.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    I have a very very strong feeling this is absolutely perfect! I'm in awe. Seriously. I never thought that I could actually get the help to do this, you are kings among men.

    I really can't thank you enough!

    Now, no old people will go unclean on my watch.

    I'm going to start adding actual data and playing with it...thank you again!

  11. #11
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    Hi guys, I have a question.

    I've added all the correct units and room numbers to the sheet. Since there are 4 units in the facility, I added additional data sheets for each unit.

    I'm wondering, do I need to go beyond the current 14 tags? Right now I have one tag for am, one for pm, but only for one unit.

    Is the best way to make 56 total tags? 14 for each unit?

    I've attached what my final sheet will actually look like (as far as total rooms/units).

    I haven't added the correct room to correct shower tag yet because I got stumped here.

    Thanks as always!

    -Nurse D.
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,369

    Re: Run a report based on a tag in a cell?

    Is there going to be one shower report of all four units or will each unit have its own shower report?

  13. #13
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    Yes each will have its own.

  14. #14
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    Also I have another question: can the drop downs be removed? Something I didn't think about was the fact that some rooms stay empty for quite some time. So, they won't be a part of the census count.

    If there is another way to leave empty rooms out I'm all for it, but I figured the easiest way would be to just remove the drop down from that particular room. Also if I remove it, how do I add it back in again when someone moves in?

    What do you think?

    Thank you!

  15. #15
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,369

    Re: Run a report based on a tag in a cell?

    There is no need to remove the drop down, just select the cell with the drop down and press the delete key to erase the In or Out displayed and leave the dropdown intact.
    I have reapplied the formulas to the Unit 1 Shower Report sheet and set up a separate sheet for the Unit 2 Shower Report.
    If you need help setting up the other Shower Report sheets please let us know.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    Wow that's perfect!

    Thanks again a million!

    -Nurse D.

  17. #17
    Registered User
    Join Date
    07-04-2025
    Location
    Buffalo, NY
    MS-Off Ver
    MS Office LTSC Standard 2021
    Posts
    10

    Re: Run a report based on a tag in a cell?

    I screwed it up somehow. When I added the sheets for Memory Care and Apartments, I get an error for the formula in column C in both of their shower reports (now named SRMC and SRA).

    Any idea what I did wrong?

    Thanks and I'm sorry!

    -Nurse D.
    Attached Files Attached Files

  18. #18
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,369

    Re: Run a report based on a tag in a cell?

    I forgot to say that cells A3 and C3 are populated using formulas.
    On the SR 1 sheet the formula in cell A3 is: =INDEX('D1'!A3:A16,MATCH(LEFT(A4,3)&A5,'D1'!B3:B16&'D1'!C3:C16,0))
    On the SR 2 sheet the formula in cell A3 is: =INDEX('D2'!A3:A16,MATCH(LEFT(A4,3)&A5,'D2'!B3:B16&'D2'!C3:C16,0))
    On the SR MC sheet the formula in cell A3 is: =INDEX(DMC!A3:A16,MATCH(LEFT(A4,3)&A5,DMC!B3:B16&DMC!C3:C16,0))
    On the SR MC sheet the formula in cell A3 is: =INDEX(DA!A3:A16,MATCH(LEFT(A4,3)&A5,DA!B3:B16&DA!C3:C16,0))
    On each sheet the formula for cell C3 is: =SUM(A3,1)
    All seems to be working now.
    Let us know if you have any questions.
    Attached Files Attached Files

+ 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. [SOLVED] Help to fix VBA codes to copy data from one report to a new Report based on criteria
    By VictoriaN in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2023, 09:59 AM
  2. Replies: 13
    Last Post: 05-09-2018, 03:38 PM
  3. Replies: 1
    Last Post: 08-01-2009, 09:44 AM
  4. Change form-based report to table-based report
    By drewship in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-27-2009, 08:55 AM
  5. print a report based on cell value
    By excelluni in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2009, 07:57 AM
  6. SAP BW Report - Putting the Unit of Measure or Currency in another Cell based on Format Cell
    By Frank & Pam Hayes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2005, 01:40 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