Question

Operating Room Schedule in Excel

Asked by: sandra312

Hi I have developed a spread sheet for scheduling of staff in the operating theatres and from reading need to turn the drop down lists into combo boxes so that my managers can view it correctly would also like the ability to add names i have tried to understand vba but need to start from scratch there as never used it ( have enrolled in a course not starting until May) and need a solution to prevent them returning to using pencil paper and eraser
any ideas welcome sample file attached
Thank you

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-02-24 at 23:56:56ID23189576
Tags

Microsoft

,

Excel

,

2003

Topics

Health Care / MUMPS

,

Microsoft Excel Spreadsheet Software

Participating Experts
3
Points
500
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Code a program for me in pascal, it's for a theatre room …
    The program should be able to keep track of seats in a theatre hall named Bonku. Thre are 22 rows with 15 seats in the theatre. Each seat is uniquely defined by the row and the seat number. The theatre has three types of customers. 1.Random customer: this one orders one or mo...
  2. how to setup the scheduling for a room?
    I am trying to setup a way for my users to schedule our conference room and get a conflict it that resoucre is not availabe at the time they want to use it. I have gone through the wizard and setup a room. But when I book it, it allow other users to book it for the same time....
  3. Protect a region into spread sheet+VBA
    Hi, I want to protect a particular region in a spread sheet by using VBA. Please help me.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: jellPosted on 2008-02-25 at 01:39:44ID: 20973898

Hi,

I just want to manage your expectations here:

(1) Trying to solution this in Excel is going to be difficult. Whilst possible, I would strongly urge you against it given your inexperience with VBA. Access would be an easier platform.

(2) It is unlikely that an expert will provide a full solution for you. You are only likely to get advice and VBA code examples in response to more specific questions.

If you decide to continue down the Excel route then I can provide the following advice.

(a) Combo-boxes are not absolutely necessary in my opinion, looking at your setup. Instead, I would continue to use validation lists, but make then refer to dynamic named ranges, rather than fixed ranges. This way, when you add to a list, it will automatically appear in the validation list.

(b) To update the validation lists, I would consider building a VBA form to do this. A combo box to allow selection of the list name, and a text box to allow entry of the new data. Your VBA behind the form should simply access the relevant named range; add an entry to the bottom; and re-sort the list.

Jell

 

by: patrickabPosted on 2008-02-25 at 04:03:56ID: 20974503

sandra312,

Jell may well be correct about Access being the better platform for such an application but the truth is that the learning curve for Access is very steep indeed. It's adopters often use obscure and arcane language which makes the whole process even more difficult. You can get help here on EE on Access but if you don't speak their language it's a waste of time. Personally I had a very poor experience in the help on Access here on EE. However that was a while ago and perhaps the Access experts are now more empathetic.

A few questions and observations:

1. Meantime I need to be clear how you are going to use your workbook. When a week's worth of schedules have been completed, do you re-use Monday's worksheet?

2. I would strongly recommend you not to use the Print-preview mode as the normal mode of use. The column and row headers become unreadable. Apart from that you have had to use unnecessarily large point sizes.

3. To convert your whole workbook into a database with a Userform interface can be done but it would take, most probably, about 1000 lines of code to do it. I have recently written a very similar application for reception desk staff at a police station.  It is not a trivial project and certainly not a 'code snippet' solution. There is also the likelihood that not all the cells would be visible without scrolling the UserForm - much as at present in that not all the cells are visible at any one moment.

4. For the moment I believe Jell's suggestion to keep with what you've got is good advice. Don't bother with Combo boxes - Data Validation is much easier - with dynamic ranges of course.

Converting what you have to a UserForm/Database in Excel goes far beyond the scope of questions on Experts-Exchange, and would need to be on a commercial basis. Meantime let's deal with the suggestions made by Jell.

a. Dynamic ranges:
Define named range SCRUBSTAFFLIST as

=OFFSET('Validation Lists'!$E$2,0,0,COUNTA('Validation Lists'!$E$2:$E$65536),1)

All the other named ranges used in Data Validation dropdown lists need to be re-defined in the same manner.

That will allow you to add names to the lists and for the new names to be added to the Data Validation dropdown lists automatically. Personally I would just add the names to the lists as and when required directly into the lists themselves.

b. I've run out of time, right now, to do the VBA sorting routines. I'll deal with them later today - if Jell hasn't already dealt with it.

Hope that helps.

Patrick

 

by: byundtPosted on 2008-02-25 at 10:20:58ID: 20977845

Patrick,
I sent you a note regarding this thread.
Brad


Sandra,
In addition to the excellent advice offered by Jell and Patrick, please consider reducing your font size and using 100% as the Zoom setting. Data validation dropdowns have a fixed size for the text, and it is quite unreadable at 50% Zoom setting. In fact, some people have even asked for a way of making it even bigger than font size you get at 100% Zoom, so I have written macros that temporarily increase the Zoom to 125% when a data validation cell is selected.
Brad

 

by: sandra312Posted on 2008-02-25 at 10:32:09ID: 20977943

Thank you so much Patrick your advice is excellent  i guess basically you have told me what i was hoping not to hear but certainly clarified some solutions,using access is not ideal I agree.
I had made the font size large so that when printing it is legible as I need to print the entire page on one A4 sheet, and when using zoom to 75% it is so  that we can see what's in those drop down lists is there a simpler solution . I haven't been re using the workbook but rather have set it up as a template so have a new one each week i normally have the validation lists hidden to stop tampering by users.
many thanks
sandra

 

by: patrickabPosted on 2008-02-25 at 14:04:51ID: 20979728

sandra,

I think you are using a sledge hammer to crack a nut. When you create a worksheet try always to stick to a point size of about 12 - plus or minus 2 and with very, very few exceptions don't use anything else. Don't bother messing around with zoom levels - it's just confusing and irritating. It's irritating because things like dropdown lists become illegible. If you want to print a largish worksheet on one sheet of A4 then go to Print Preview/PageSetUp and select the print 1 page wide  x 1 page tall option. That's all you need to do to print it. As soon as you take other options you will get in a mess pretty quickly. I found, for example, your whole workbook almost unusable until I have removed almost every bit of formatting and reduced the font size on every worksheet to 12.

Lastly avoid like the plague, merged cells. They are a total pain and will always cause you trouble. Almost without exception you can achieve the same effect without using merged cells.

Patrick

 

by: sandra312Posted on 2008-02-26 at 01:10:26ID: 20982652

Thank you all for your comments you are ALL  right i was completely going about this the wrong way and have reduced font size to 10 and all is good   thanks for putting it all in perspective and the time you have taken to look at a novice work  it is greatly appreciated particularly when this must have seen to be such a mess what was i thinking!!! i just increase the A4 sheet to A3 for the final posted copy and even the oldies can read it !that was a big complaint before and i had struggled with the print Preview/PageSetUp and select the print 1 page wide  x 1 page tall option. as it had been printing way to small but all was good today
thanks HEAPS sorry again for the triviality of my request
sandra

 

by: patrickabPosted on 2008-02-26 at 03:15:18ID: 20983168

Sandra,

I have made a start on the VBA for the sorting of the Data Validation lists. The code is below as is the file with the code in it.

1. Make a change to any of the lists with the yellow headers and you will see that the names are sorted automatically. Ensure that there is no gap in the list of names.

2. In future try to create named ranges with MUCH shorter names. Long names are a pain to cope with. For example SCRUBS would have done.

You will see that if you want to extend the automatic sorting process, you will need to add further lines of VBA code. Note not only the range name in the [] square brackets but also the key for the sort - such as Key1:=Range("E3") - which is unique for each named range. The line of code:

    [SCRUBSTAFFLIST].Sort Key1:=Range("E3"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal

is only ONE line of code. A space followed by an underline allows one to place the code on the next line - for easier reading. The compiler then treats it as one line of code.

To get to and from the VBA Editor - use ALT+F11. By the way you may find easier, when changing/improving the DataValidations worksheet, to disable the worksheet_change sub. To do that just put an x in front of its name - like this:

Sub Xworksheet_change(ByVal target As Range)

When you want to work again - remove the X.

Hope that helps a bit more

Patrick

Sub worksheet_change(ByVal target As Range)
Dim rng As Range
 
Set rng = Sheet1.Cells
 
If Not Intersect(target, rng) Is Nothing Then
    [SCRUBSTAFFLIST].Sort Key1:=Range("E3"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
    [ANAESTHETICSTAFFLIST].Sort Key1:=Range("F3"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
     [PACUSTAFFLIST].Sort Key1:=Range("G3"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
    [TTSTAFFLIST].Sort Key1:=Range("H3"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
End If
 
End Sub

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:

Select allOpen in new window

 

by: patrickabPosted on 2008-02-26 at 04:00:29ID: 20983438

Sandra,

In the code pane for Sheet2 I have placed the VBA as below (file also). What this does is to watch for any change to the date in cell B1 of the Monday worksheet. As soon as you change that then all the worksheet names change automatically. Also all the dates on each sheet are automatically updated as well - that's done with simple formulae in each sheet Tue thru' Sat in cells B1 on each sheet. Try changing the date for next Monday in the Monday sheet - but change it in the editing box beside the fx.

That should at least make it easier for you to create a new workbook each week.

Hope that helps a bit more.

Patrick

Sub worksheet_change(ByVal target As Range)
Dim rng As Range
Dim i As Long
 
Set rng = Sheets(2).[B1]
 
If Not Intersect(rng, target) Is Nothing Then
    For i = 2 To Worksheets.Count
        Sheets(i).Name = Sheets(i).[B1].Text
    Next i
End If
 
End Sub

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:

Select allOpen in new window

 

by: sandra312Posted on 2008-02-26 at 10:42:57ID: 20987282

Patrick that look perfect i will try it out at work today thanks for all your work and great solutions will send the updated copy back tonight
sandra

 

by: sandra312Posted on 2008-02-26 at 22:56:41ID: 20991928

Hi patrick here is my latest version
with just as it is without any code
cheers
sandra

 

by: sandra312Posted on 2008-02-27 at 00:54:20ID: 20992372

Hi Patrick forgot to say have taken your advice with merged cells etc i think!! have also resized the rows in this version to allow it take up the majority of an A4 sheet and be legible? I have re done validation lists but left one blank cell in each list as this seemed the workaround to allow users to free text as agency staff are not names we would keep in a validation list  and also  trying to reduce AGENCY use, they are different people each time. I will add permanent staff as they come on line,you are so right that i was using a sledgehammer.I haven't added any of your great suggested code yet next step before i do  i was interested in your opinion of the revised format the validation lists is hidden in this file  
Thanks again
sandra from down under

 

by: byundtPosted on 2008-02-27 at 05:23:07ID: 20993690

Sandra,
There is a checkbox in the data validation dialog to allow users to type in any value they wish, such as for Agency staff. You'll find this somewhat incongruously named checkbox in the "Error Alert" tab; it is called "Show error alert after invalid data is entered". The correct setting for your purposes is unchecked.

Brad

 

by: patrickabPosted on 2008-02-27 at 08:12:02ID: 20995171

Sandra,

Attached is the View-modified copy of your Template. I have changed the Zoom to 85%.

Perhaps you are not aware that you can make the same changes to all the worksheets at the same time. I have for example changed the width of column A and all the row heights in one go. To do that, click on the first worksheet tab, hold down SHIFT and click on the last worksheet tab. That selects all the worksheets. After that any change you make on the first worksheet is also made in the other selected worksheets. To 'ungroup' them either click on a worksheet that is not in the selected group or right click on a an selected worksheet tab and select 'ungroup'.

I believe you now need to implement all the changes I have suggested. I have given you examples of what and how to do it/them - namely:

1. Dynamic named ranges
2. Auto-sorted named ranges
3. Automatically dated ranges on each worksheet
4. Automatically named worksheets - according to the dates

You will need to look at each of the implementations carefully and use them one by one. When you have you will find you have a workbook that is much easier to use and to update each week.

I think it's now time for you to close this question.

Patrick

 

by: sandra312Posted on 2008-02-27 at 10:13:51ID: 31433822

Thank you for all your solutions time and patience

 

by: patrickabPosted on 2008-02-27 at 12:41:46ID: 20998157

Sandra - No problem - thanks for the grade. - Patrick

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...