Formula Forensics No. 031 – Production Scheduling using Excel

Share

Facebook
Twitter
LinkedIn

Recently, Bluetaurean asked in the Chandoo.org Forums about ways to allocate work durations for various product lines across 24 hour days to create a daily schedule.

Both formula-based and VBA-based solutions were offered.

Today at formula Forensics we will take a look at the formula-based approach.

As always at Formula Forensics you can follow along, Download Here – Excel 2007-2013.

 

Set the Scene

Since one might encounter a similar need in a variety of contexts (manufacturing, engineering, project planning, etc.), we will look at a more general problem of allocating a set of tasks and corresponding durations to one or more days, as shown in the following diagram.

We will create two output views:

  • One that is a flat list that can then be manipulated further using Excel’s Pivot table feature, and
  • Another view that mimics a pivot-table (and is similar to a typical project Gantt view, but with actual values listed instead of a bar chart).

You can follow along using the attached Excel document. Download here Excel 2007+

 

Problem Specifics

  • We have a list of tasks and their durations.
  • We need to distribute the tasks to different days, without exceeding the maximum available duration in a given day.
  • When the hours in a day are “used up”, we need to allocate the remaining task duration to the next day, and so on.
  • On the other hand, if a given task does not use up all of the hours in a given day, we will need to assign more than one task for that day, provided the combined durations do not exceed the available hours for that day.
  • In other words, we will need to split a task across one or more days, or combine one or more tasks into a single day, as needed, to maximize the work performed in a given day.

 

Developing the Approach

Before we tackle this problem in Excel, let us review how we might do this manually. Like most things, we might use the following three step process:

  1. Take the first task and assign its duration to Day 1. If the task’s duration exceeds the maximum hours available in a day, allocate the portion of the duration that does not fit into Day 1 into Day 2.
  2. Take the second task, and see whether it can fit into an existing day, or whether it needs to be distributed to multiple days
  3. Etc. (OK… so that three-step process was a stretch!)

Statistics show that most people think in terms of IF-THEN-ELSE statements. So here it is…

For a given Day, and for a given Task,
If [Hours Not Allocated For that Task] > [Hours Available for that Day] Then
Set Duration for that Day as [Hours Available for that Day]
Else
Set Duration for that Day as [Hours Not Allocated for that Task]
End
Continue the above evaluation until all tasks have been allocated to days.
 

Of course, the above IF() logic can be condensed as follows:

MIN( [Hours Not Allocated For that Task][Hours Available for that Day] )

 

Putting it All Together: Output Option 1: Gantt-like View

Let us employ the above approach to create the Gantt-like view.

To make our approach more generic, we will use an Excel Name called “MaxHrsPerDay” to indicate the maximum available hours in a given day. (In the sample worksheet, it has been set to 24 hours.)

Our source data is setup as shown in the diagram below:

  • Tasks are in the range A2:A5
  • Durations are in the range B2:B5

We will create the output in a separate worksheet, in the range A1:E5 as shown below:

Put the following formula into cell A2 and copy down to A5:

=SourceData!$A2

(This formula is merely referencing the values from the SourceData sheet. The sample workbook also includes an approach to make this reference more location independent.)

Put the following formula in cell B2, and copy it down and right:

=MIN((SourceData!$B2-SUM($A2:A2)), (MaxHrsPerDay-SUM(B$1:B1)))

 

Setup the header row (B1:E1) as desired. (I have used text values for the header. You could also calculate the header text using formulas. Since that is straightforward, I will leave that as an exercise for the reader.)

Now let us look at what the formula in cell B2 is doing:

  • SUM($A2:A2) is calculating the sum of the allocated durations for TaskA. (Please note the use of absolute and relative references. The formula is anchored on column A, but the starting row, ending row and ending column are free to expand.) SUM($A2:A2) returns zero since SUM() ignores text values.

– If you look at cell C2, the reference changes to SUM($A2:B2).
– In cell B3, the reference changes to SUM($A3:A3). You get the idea

  • (SourceData!$B2-SUM($A2:A2)) calculates the difference between the duration for TaskA (40 in the example) and the hours allocated as of that point (0), to return 40-0=40.
  • SUM(B$1:B1) is calculating the sum of the allocated hours for Day1. (Again, we are using a combination of absolute and relative references to keep the calculation anchored on column B.) In this case, the value is zero, since this is the first allocation for Day1.
  • (MaxHrsPerDay-SUM(B$1:B1)) calculates the hours remaining (i.e. available) for Day1. Since this is for cell B2, the calculation returns 24 – 0 = 24.

That is it!

We put those absolute and relative references to good use!

This approach was easy because all we had to do was calculate the duration for a given task for a given day.

 

On the other hand, if we had to figure out what the Task was, or which Day it was, the calculation gets a little more involved. Since this is “formula forensics”, we would not have it any other way! 🙂

 

Putting it All Together: Output Option 2: A Sequential List of Tasks and Durations for Each Day (i.e. a Flat List)

As before, we will use the Excel Name “MaxHrsPerDay” to refer to the maximum hours in a Day.

As shown in the following diagram, we will turn the source data into a flat list of Days, Tasks and Durations:

Unlike with VBA, since a formula cannot choose which row and column to write its output, we have to set the formula in every cell where we suspect there might be a value.

In the above sample diagram, we copy the formulas from row 2 to row 9. However, row 9 shows “…” indicating that the list was completed by row 8.

Let us look at how to determine the value for Day, Task and Allocated Duration.

For ease of description, I have created the following Excel Names:

WorkList: =A2:A5 in the source data.

WorkDuration: =B2:B5 in the source data

While creating the Gantt-like view earlier, we were able to take advantage of the static “Day” and “Task” values to determine the Remaining Duration, Available Duration, etc. Since we now have to determine all three values (Day, Task, Allocated Duration), we will need some “helper” data.

We will add a column alongside the source data that shows the cumulative duration (for reasons that will become clear shortly), as shown in the following diagram:

Cumulative Duration is calculated as the sum of all durations up to a given row.

  • For example, in cell C2, the Cumulative Duration is 40.
  • In cell C3, the Cumulative Duration is 40+20=60
  • And so on.

For ease of referencing, we will use an Excel Name called CumulativeDuration =C2:C5.

 

Let us look at why we need the “CumulativeDuration” helper column:

The circular logic problem

In order to determine the durations already allocated for a given day, we will need to know which Day it is.

We also need to know which Task we are trying to calculate the duration for.

So… do we calculate the Day or the Task or the Duration first?!! As you can imagine, that will soon land us in some circular logic.

 

Some helpful observations about the output:

  • In column C of the output (on worksheet FlatList), the sum of allocated durations adds up to the total duration for all tasks. (No surprise here!)
  • If every task had duration equal to the MaxHrsPerDay, you would have the same duration value for all days. (Not surprising, but interesting!)
  • In other words, you could think of the Allocated Duration column as the total duration for all tasks, allocated MaxHrsPerDay at a time.
  • Now we need a way to iterate through the duration values one at a time and account for the durations already processed. In other words, each value needs to contain all of the previous values. Welcome to an array of the cumulative durations!
  • For example, in the cumulative array “{40;60;65;80}”, the value 60 already includes the previous value 40 in it. This allows us to subtract all durations allocated up to a given row, to get the duration value that is remaining to be allocated.
  • Since Excel is good with numbers, we will base the calculation for AllocatedDuration and Tasks on the Duration values.
  • By calculating the two values separately, we avoid the circular logic.

Let’s now look at the formulas for Day, WorkItem and AllocatedDuration.

It would be easier if we looked at the formulas in reverse order, starting with AllocatedDuration, then WorkItem, and finally Day.

Formula for “AllocatedDuration”

Enter the following formula into cell C2, ending with Ctrl+Shift+Enter, as shown in the following diagram:

=IF(SUM(C$1:C1)>=SUMPRODUCT(WorkDuration), “…”,MIN(INDEX(WorkDuration, MATCH(TRUE, CumulativeDuration-SUM(C$1:C1) > 0, 0)) – SUMIFS(C$1:C1, B$1:B1,B2), MaxHrsPerDay-SUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)))) Ctrl+Shift+Enter

Let us look at the formula closely (using the formula in row 2):

  • SUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)) -> This calculates the sum of all allocated durations up to the previous row, where the Day = current row’s day. Please note the use of absolute and relative references. They allow us to expand the range as we go down the rows, while remaining anchored to the first row.

– Since this is the first data row, C$1:C1 returns “Allocated Duration” and the ISNUMBER() function returns FALSE, and consequently, the IF() function returns 0.
– A$1:A1 returns “Day”, and the test A$1:A1=A2 returns FALSE. Please note that in this case, it does not matter whether A2 has a value in it, whether it has the value 1, etc.
– SUMPRODUCT() provides the result of FALSE * 0 = 0

  • MaxHrsPerDaySUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)) -> This calculates the difference between maximum duration available for a day and the sum of durations allocated for the current day. In other words, it calculates the available duration for the current row’s day.

– In this example, the calculation results in MaxHrsPerDay (24 in our example) – 0 = 24

  • SUMIFS(C$1:C1, B$1:B1,B2) -> This calculates the sum of all allocated durations for the current row’s task. Since B$1:B1 is the text value “Work Item”, the SUMIFS() returns 0. Again, it does not matter if B2 is blank or has a value like “TaskA”, since Excel correctly evaluates the condition whether B$1:B1 equals B2.
  • SUM(C$1:C1) -> This calculates the sum of all allocated durations up to the previous row.
  • CumulativeDurationSUM(C$1:C1) -> CumulativeDuration evaluates to {40;60;65;80}. SUM(C$1:C1) evaluates to zero. As such, the expression evaluates to {40;60;65;80} – 0, or {40;60;65;80}.

– If we look at the calculation for this expression in cell C3 (the expression would be “CumulativeDuration—SUM(C$1:C2)”), we would get the result of {40;60;65;80} – (0+24) = {16;36;41;56}. (As you know, subtracting a scalar value from an array results in an array with each value reduced by the scalar value.)

– If we look at the calculation for this expression in cell C4 (the expression would be “CumulativeDuration—SUM(C$1:C3)”) , we would get the result of {40;60;65;80} – (0+24+16) = {0;20;25;40}

– As you can see, each successive calculation reduces the CumulativeDuration array by the amount of hours already allocated. By reducing the CumulativeDuration array in this fashion, we ensure that we do not “double count” a duration.

– If a value in the array evaluates to zero, it means the corresponding duration has been fully allocated. (In cell C3, the first value in the array is zero, indicating that the original 40 hours has been fully allocated.) We will put this knowledge to good use in the next expression.

  • MATCH(TRUE, CumulativeDuration—SUM(C$1:C1) > 0, 0) -> The expression CumulativeDuration—SUM(C$1:C1) > 0 evaluates to ={TRUE;TRUE;TRUE;TRUE} because all values are greater than zero. By performing a MATCH() for TRUE, we are able to find the first location in the array that has a non-zero value.

– If we look at the result of this expression in cell C3, we get {16;36;41;56} > 0 = {TRUE;TRUE;TRUE;TRUE}

– If we look at the result of this expression in cell C4, we get {0;20;25;40} > 0 = {FALSE;TRUE;TRUE;TRUE}

– As you recall, the zero values (or FALSE) correspond to the durations that have been fully allocated, whereas, the non-zero values (or TRUE) correspond to the durations that have NOT been fully allocated.

– It is helpful to note that MATCH() returns the LOCATION of what it finds. As such, the returned location is that of the first duration value that has not been fully allocated! Since the CumulativeDuration array is the same size as the WorkDuration array, we will be able to put this returned location value to good use in the next expression.

  • INDEX(WorkDuration, MATCH(TRUE, CumulativeDuration — SUM(C$1:C1) > 0, 0)) -> By using the location value (of the first duration value that has not been fully allocated), we find the corresponding original duration value from the WorkDuration array.

– As we saw earlier, the expression “CumulativeDiration – SUM(C$1:C1)” reduces the CumulativeDuration by the duration values allocated to that point. However, the resulting array could have partial duration values as well. By referencing the corresponding duration value from the WorkDuration array, we ensure that we retrieve the original (full) duration value that was to be allocated.

  • MIN(…) -> This expression calculates the value of MIN([Hours Not Allocated For that Task], [Hours Available for that Day])

– [Hours Not Allocated For that Task] is returned by INDEX(WorkDuration, MATCH(TRUE, CumulativeDuration—SUM(C$1:C1) > 0, 0)) – SUMIFS(C$1:C1, B$1:B1,B2)

– [Hours Available for that Day] is returned by second half of the MIN() expression: MaxHrsPerDay—SUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)).

– So, we essentially got back to the logic we started from, which is the same logic we used for creating the Gantt-like view as well.

  • The remaining portion of the formula (the IF() check) determines if all of the hours have been allocated. If all hours have been allocated, it returns “…”.

SUMPRODUCT(WorkDuration) -> This expression calculates the total of all work duration values. In cell C2, it evaluates to SUMPRODUCT({40;20;5;15}) = 80

SUM(C$1:C1)>=SUMPRODUCT(WorkDuration) -> Determines if the sum of durations allocated up to that point is greater than the total for all durations. (Since this is part of an array formula, you could also use the SUM function in place of SUMPRODUCT. But I am partial to the SUMPRODUCT function!! So, unless you are in a competition where the winner is determined by the shortest formula, feel free to use either one!

 

Formula for “WorkItem”

Enter the following formula into cell B2, ending with Ctrl+Shift+Enter, as shown in the following diagram.

=IF(SUM(C$1:C1)>=SUMPRODUCT(WorkDuration), “…”,INDEX(WorkList, MATCH(TRUE, (CumulativeDuration-SUM(C$1:C1)) > 0, 0))) Ctrl+Shift+Enter

You are already familiar with most of the formula components since you saw them in the formula for AllocatedDuration. The only difference is that in this formula, we are returning a value from WorkList. (i.e. we locate the position of the first non-zero duration in CumulativeDuration array, and since that array is the same size as the WorkList array, we are able to find the first Task that has not been fully allocated.)

Formula for “Day”

Enter the following formula into cell A2, ending with Ctrl+Shift+Enter, as shown in the following diagram:

=IF(SUM(C$1:C1)>=SUMPRODUCT(WorkDuration), “…”, MAX( N(A1) + (SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay), 1)) Ctrl+Shift+Enter

Let us look at the formula in detail (using the formula in row 2):

  • SUMIFS(C$1:C1, A$1:A1, A1) -> This expression calculates the sum of all durations (in column C) where the Days (in column A) equal the previous day.

– In cell A2, this expression evaluates to “SUMIFS(“Allocated Duration”, “Day”, “Day”)” = 0. (Excel smartly ignores any non-numeric values in the first argument.)

– In cell A3, this expression evaluates to “SUMIFS({“Allocated Duration”;24}, {“Day”;1}, 1)” = 24.

  • SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay -> This expression checks if the sum of all durations where the Days equal the previous day is greater than or equal to MaxHrsPerDay.

– In cell A2, this expression evaluates to FALSE

– In cell A3, this expression evaluates to TRUE

  • N(A1) -> This expression returns the numeric value for its argument. Since N() returns zero for any non-numeric arguments, we use this function to return zero for the heading (“Day”) in A1. (Any numeric values are returned as is.)
  • MAX( N(A1) + (SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay), 1) -> The first argument of the MAX function “N(A1) + (SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay)”returns the next increment for day, if the previous day has been fully allocated. Otherwise, it returns the same value as the previous day.

– In cell A2, this expression evaluates to MAX( N(“Day”) + (SUMIFS(“Allocated Duration”, “Day”, “Day”)>=24), 1), which evaluates to MAX( N(“Day”) + (0>=24), 1), which evaluates to MAX( 0 + (FALSE), 1), which finally evaluates to 1.

– In cell A3, this expression evaluates to MAX( N(1) + (SUMIFS({“Allocated Duration”;24}, {“Day”;1}, 1)>=24), which evaluates to MAX( N(1) + (24>=24), 1), which evaluates to MAX( 1+ (TRUE), 1), which finally evaluates to 2 since 1 + TRUE = 2.

 

Download

You can download a copy of the above file and follow along, Download Here – Excel 2007-2013.

 

Final Thoughts

While we used the same basic logic for both output options in this article, there are probably many other ways to tackle the age-old problem of production scheduling.

I would love to hear about some of your ideas, as well as ways to extend the concepts described here.

In the meantime, I wish you continued EXCELlence!

Sajan.

 

Other Chandoo.org Posts related to Scheduling

Here at Chandoo.org you can find the following related posts:

http://www.chandoo.org/wp/2010/11/18/scheduling-variable-sources/

http://chandoo.org/wp/2009/06/16/gantt-charts-project-management/

http://chandoo.org/wp/project-management-templates/gantt-charts/

 

Thank You

This was Sajan’s second post at Chandoo.org and so a special thank you to Sajan for putting pen to paper to describe the technique here.

You may want to read Sajan’s first post here or thank him in the comments below:

Formula Forensics “The Series”

This is the 31st post in the Formula Forensics series.

You can learn more about how to pull Excel Formulas apart in the following posts: Formula Forensic Series

 

Formula Forensics Needs Your Help

I need more ideas for future Formula Forensics posts and so I need your help.

If you have a neat formula that you would like to share like above, try putting pen to paper and draft up a Post like Sajan has done above or;

If you have a formula that you would like explained, but don’t want to write a post, send it to Hui or Chandoo.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

70 Responses to “10 Tips to Make Better and Boss-proof Excel Spreadsheets”

  1. Yogesh Gupta says:

    Proper print settings on each sheet helps your boss to print the reports quickly without hastling you after printing irrelevant stuff.

    It is highly relevant that you print your reports once before circulating it to your boss or other people.

    Knowing that what your boss actully look at in the entire report can be very usefull. You can build a good summary of what your boss wants and put that as separate tab in the form of dashbord report, so that your boss does not peep into rest of your work and start pocking you with irrelevant stuff.

    You can also put that Dashboard into the email summary and not trouble your boss to open your workbook. This is ultimate boss proof tip and I have been using this for long time now.

  2. Shuchi says:

    Thank you Chandoo. Great checklist to follow before delivering an excel spreadsheet to someone else. Some points you mention are seemingly so simple that we might overlook them - like selecting cell#A1, but they make a difference to the impression the spreadsheet creates at the recipient's end.

  3. Tom says:

    Dear Chandoo,
    Great tricks.

    One trick I use (more and more) is to hide the sheet tabs and to hide the formulabar via the 'tools' 'options' and the 'view'-tab.

    Another trick is to limiting the scrolling area to hide all columms (or rows) until the end of the sheet. Select the column, press CTRL+SHIFT+RIGHT, right-click on the column and hide (also possible via VBA).

    I was wondering though if 'boss-proof' is related to 'excel-stupid-proof'?
    Cheerio
    Tom

  4. Martin says:

    Absolutely agree with this post !!!

    on the past months, after reading this blog, PTS's and Debra's Contextures, one of the things I've beggining to do as a best practice is to create all my spreadsheets with 3 tabs: data, summary and control, and this last one generally xlveryhidden, and sometimes the data one hidden as well.

    And this restrictions are also being applied as best practice, and with a lot of benefits as you well mentioned. Furthermore, if combined with dynamic named ranges, formulae is more readable to users, and the WOW effect is often achieved when the question "How did you do that?" arises.....

    Keep on the good posts !!!

    Rgds,

    Martin

  5. Nilesh says:

    Is there a way to keep the data in a seperate file rather than the same excel. This way you could keep presentation and data separate. But not sure how you would link up the two excel files

    • Pieter says:

      Yes, there is a way but it is not prefered.
      I used this a coulple of times, (You need to code).

      mail me if you need assistance with some sort

    • T says:

      It entirely is possible. The problem comes though, when you share the spreadsheet.

      If the recipient doesn't have both files, or access to both, things break when the values try to refresh.

  6. bazlina says:

    ey, why is the boss a she??

  7. Karthik says:

    Chandoo, one more trick that we could use with the help of VBA, RT click on the View code of the particular sheet, in the properties table set the Visible status to 2-xlveryhidden, this ensures the sheet name does not show up even when the BOSS tries to unhide the sheet from the sheet >> unhide option. Dont forget to password protect the VBA (available under tools >> VBAProject properties.

  8. Eric Lind says:

    Very good tips, although I have to say Chandoo, that your cats probably need to be spayed or neutered if they behave like that. =)

  9. Good to see all these tips on a single "sheet", and giving the name *boss proof*, and Dilbert was a great welcome 😀

  10. Peter H says:

    The best way to "Boss Proof" (and "Self Proof"!!) a spreadsheet is to keep back ups. I use a macro that saves the last 3 significant versions of the spreadsheet all with a date stamp included in the file name.

  11. To quickly select cell A1 on all sheet, use CTRL-Page UP or CTRL-Page down to navigate between sheets and CTRL-Home to select cell A1 (if you have frozen pane, it will select the top left cell of the section below).

  12. Jorge Camoes says:

    Great list. And I follow every single item... I also use a consistent background color for input cells in every report/dashboard. And I use a little VBA to identify the user and change the report accordingly (selecting the right market, for example).

  13. Tim Buckingham says:

    Chandoo, Nice post. I like to use the hidden Paste Picture Link option. Keep the original report you want displayed on a hidden sheet and only show the boss the report picture. Also great to watch the confusion when boss trying to select cells is worth the effort!

  14. m-b says:

    I usually save as PDF if there's no interactivity in the report. That way nothing can go wrong 🙂

    • Janet says:

      PDFs work a dream for me too and saves the boss's EA from telling me all the time that she can't print my work!!

  15. Chandoo says:

    @All.. thanks a ton for sharing your ideas. I am thinking of writing a part 2 of this post explaining some of your ideas in detail.

    @Bazlina ... I will make sure the boss is a HE in the next post 🙂

  16. Hui... says:

    "10 Tips to Make Better and Boss-proof Excel Spreadsheets"...
    Unless of course your Boss reads PHD !

  17. Debra McLaren says:

    Great article with one glaring error.

    If (like me) the majority of your spreadsheet errors are *caused* by cats, adding more cats is just going to increase the problem.

  18. Chandoo says:

    @Hui you always have a boss, even if you are boss. If you dont have a boss, then may be a cat or even a dog.

    @Debra: hmm... Are you sure the cats are not after the mouse? Go learn some keyboard shortcuts.. now 😛

  19. Paul Grenier says:

    Great Web Site. I've done almost all the above in trying to build my application and it's taken me hours and hours reading my "dummies " book. Thank you for all this information.
    Is there a formula I can use that will automatically return to "A1" cell should an associate use the 10 page spreadsheet I have?
    Is there a way to set an expiration date on my workbook so that beynd that date no one will get beyond the cover page?

    • Russell Cooney says:

      Paul, in all my "user facing" workbooks (those that I distribute) I create a named range called "Home" on the worksheet(s) that are most likely to be used. Then I write a little VBA that selects the Home range whenever that worksheet is activated or on other triggers depending on the context of the sheet. This is more appropriate for the dashboard tabs or summary tabs my job requires.

      But I usually set this functionality up early on in the design process so I can take advantage of it as well. I will sometimes assign a keystroke to the GoHome macro.

  20. JimmyG says:

    I'm in the marketing department (aka the picture department) and have to say that the macros/Excel sheets from our controlling department are the worst! They come to me to sort out the mess!!

  21. Chandoo says:

    @Peter: You can try creating a table of contents and then place it on each and every sheet so that user can jump to anywhere from anywhere. Here is a tutorial to help you get started.

    Also, You can prevent users from accessing the workbook after a certain date using macros. But users can certainly by pass it by disallowing macros on that workbook.

    @Jimmy: Wow... (just kidding) Welcome 🙂

  22. Ryan says:

    I was recently given a spreadsheet to improve upon.
    One of the "boss-proof" actions that the previous author had used was to use data validation instead of protecting the sheet to ward off people changing formulas.
    After entering a formula or value into a cell, use data validation to only allow, in this spreadsheet, whole numbers between 9999999 to 99999999.
    It's a bit of a pain to actually correct stuff instead of just unprotecting a sheet, but for those that know how to unprotect a sheet, it's a definite way to keep them from fooling with formulas.

  23. Raja Srinivas says:

    Puchu,
    We would love to see "Print" in your links section.
    It helps us taking prints as neat as your posts 🙂

  24. Paul Grenier says:

    Chandoo,
    I've emailed you a couple of times looking for avenues I need to try to put my workbook on the Internet.
    I notice you use PremiumThemes for your Web Site...You must feel good about their service. Do you think PremiumThemes might be an option for me?
    Paul

  25. Anurag G says:

    Instead of :
    Now Right click and select “Hide” option.

    Shortcut can be used : Ctrl+0 (to hide)..

  26. danial says:

    sir i wanted to know,how to hide cells or tab without hiding rows and columns? PLZ TELL ME

  27. JunDR says:

    Hi Chandoo!

    Great tips! Im researching on an excel project now that you can create to "lighten" the size without sacrificing the data inside..
    We usually encounter problems with the data, excel file is shared, in a network folder.. and there are 11 people that enters their own productivity in each tab.. however, there comes a time (uncertain) where some of the data they enter either gets deleted or changes value.. could this be a file size problem? are there other ways to create this file that will decrease data inconsistencies?

    thanks!

  28. [...] Hide un-necessary rows to create clean looking workbooks (and 9 more tips) [...]

  29. [...] Presentation format: all spreadsheets, should be designed so that it is easy to follow the process flow and result. Almost every spreadsheet should be presentable and understandable to senior management without additional formatting or explanation. (tips: how to design boss-proof excel sheets) [...]

  30. [...] on Excel formatting here: How to make better excel sheets, Formatting [...]

  31. [...] on Excel formatting here: How to make better excel sheets, Formatting [...]

  32. [...] tips: Learn how to make better Excel sheets Spread some love,It makes you awesome! [...]

  33. Janet says:

    Save what you want the boss to see as a PDF.  Absolutely foolproof and no cats hurt in the process.

  34. malen says:

    I really enjoyed allot of the tips on here, especially the one on comments on cells. That will come in handy on allot of our projects. I would also like to share on on my little tricks. I am constantly working on several different reports with several different systems and in doing so I am constantly running in problems and my way out of them is simply calling <a href"http://www.reportingguru.com/"> Reporting Guru </a> and telling exactly what I'm going through and they can tell me exactly how to get out.

  35. The_Doctor says:

    One of the things I've found to boss proof my worksheets are a few simple VBA scripts to automatically protect the workbook/worksheets, and direct them to the "Quick Look" dashboard page, I hide all of the raw data sheets before saving.  The script looks like this:
    Private Sub Workbook_Open()

        Sheets("Summary").Protect Password:="password"
        Sheets("Labor Cost by Site").Protect Password:="password", AllowUsingPivotTables: =true
        Sheets("Labor Cost by month").Protect Password:="password"
        Sheets("Quick Look").Protect Password:="password"
        Sheets("Quick look").Activate
        ActiveWorkbook.Protect Password:="password", Structure:=True, Windows:=False
    End Sub

    I also have a pivot that contains labor cost data which cannot be refreshed while the worksheet is locked.

    Private Sub Worksheet_Activate()
        Sheets("labor cost by site").Unprotect Password = "password"
            Set pvttable = Worksheets("labor cost by site").Range("a1").PivotTable
                pvttable.RefreshTable
        Sheets("labor cost by site").Protect Password = "password", AllowUsingPivotTables:=True
    End Sub

  36. lol says:

    OPPAN GANGAM STYLE!
     

  37. Rahul thial says:

    Your post are always with something creative , thanks for sharing this information , your post are worth reading and implementing 🙂 great job

  38. apt says:

    Hi,

    I will try to learn every point slowly !

    Shokran Chandoo.

  39. SpreadSheetNinja says:

    Best boss Proofing of sheets is useing indirect(address 😛 this prevents most smartass bossess from doing any actual changes cus the formula will be long and hard to understand for any bystanders..

    Also putting the actual calculations on a different sheet can make a sheet bulletproof from bosses.. especialy if you put them in the Very hidden so when the boss learns how to unhide sheets he wont simply find them.

    One thing iv also learned is that most bosses is scared of macros that gives "virus" warnings before beeing run 😛 That include the default warning from Excel...

    Long formulas or work arounds is best way to go.

  40. Novice says:

    What's the best way to amalgamate two existing excel spreadsheets into one?

    Two teams use the same format spreadsheets with individual data split into calendar months and I want to make them one without manually entering the data.

  41. Isaac says:

    Changing the properties of the file to read-only . (While the file is closed, right click on the file and check the read-only box.)

    This allows my boss(es) to access the file -- even change it -- without being able to save their changes. If a boss likes his 'new' version, he can save it with a different file name.

    But now -- how to prevent the boss from deleting the file altogether? Or deleting the whole network?

    • pieter says:

      Hey man.
      Think you can go as easy as to make a shortcut that links to your read only document. Then the boss wont know of the root document. He can figure it out but lets face it. He is a boss and 70% if them wont know squat

  42. Matt says:

    Instead of "Hiding" rows & columns, I find "Grouping" works best as its very easy to quickly see if a worksheet has hidden rows/columns. Sometimes hiding a random row/column is not easily noticed and can create issues.

  43. samantha says:

    I have one xl sheet with different dates in many columns and one raw's. I want to send this data to another xl sheets for each date. if somebody can help me will be great.

  44. Mariateresa says:

    Hello, I have just found out that I made a mistake in my spreadsheet: I had a column of negative numbers, but one of them was positive (while it should have been negative). Is there a formula/system to avoid this?

    Thanks.

    Mariateresa

  45. Hi,

    Hiding any worksheet can be unhidden and messed around easily. I change the visibility in visual basic from -xlSheetVisible to -xlSheetVeryHidden. By this, even if you right click on sheets, you will be unable to find the hidden sheets.

    Cool? I think so...

  46. sandeep says:

    Very informative, Thanks

  47. Cedric says:

    Is there a way to lock cells in an already protected worksheet.
    (Thus the entire worksheet is protected, then the entire office can open it as read only but only a few users have the password to edit the file)
    I would like an additional password or prompt box so these few users don't accidentally change formulas.

  48. Itss such as you learn my thoughts! You appear too understand
    a lot abnout this, like you wrote thee e-book in it
    or something. I fel that you just could do with some percent to presseure the message house a little bit,
    but insatead off that, this iis wondeerful blog.
    An excellent read. I'll definitely be back.

  49. free movie says:

    It is in reality a nice and helpful piece of info.
    I am happy that you just shared this useful info with
    us. Please keep us up to date like this. Thank
    you for sharing.

  50. GraH says:

    I laughed out loud reading the 2nd solution about moving to marketing department and making ppts.
    I've been using "technical" sheets for a long time already and depending on the audience it is hidden or not. I'm currently in my NO VBA mindset, so the very hidden option is no longer. Using sheets names like: TechnicalCodes; ExplicitVariables;SetUp; HeavyCalc seem to work to my experience as they send along a message "Don' t you mess-up here, you fool!". A "Read This" section or sheet however does not work!
    Reading stuff on this site has helped me develop a good habit of using colors and themes to assist the end user in being well-behaved. In my book the best advise here, because it is about the user experience and not only about protection your own work.
    For dashboards I get rid of tabs and scroll bars. Besides 2 exceptions, I need to come across a manager who can turn them on again without my help.
    Seems that I forgot about protecting cells, sheets and workbooks altogether. Damn!

  51. Mark H says:

    Thanks for the informative article Chandoo, I've been struggling with Excel lately. It's a powerful tool, but hard to learn for me.

  52. Neeraj Singh says:

    Thanks Chandoo for sharing these excel sheet tips it helps me a lot to understand excel more.

  53. Bryan says:

    Nice roundup, Chandoo! Here's one more I thought would be relevant:

    For Excel 2013+, you can hide the ribbon, as shown in this animated gif: https://gridmaster.io/tips/hide-ribbon-excel-space

    This will simplify the interface, making it less likely for people to accidentally make changes. 🙂

  54. KUMAR says:

    THANK YOU SIR

  55. constantine la says:

    I'm better at Power BI thanks to you!

Leave a Reply