Sub topic 13
Designing a workbook that several people can edit safely
Real-time co-authoring handles most simultaneous edits without trouble. The remaining problems come from the workbook's layout: two people typing in the same cell, one person sorting a range while others work in it, or someone overwriting a formula. This chapter covers how to lay out a workbook so those problems are unlikely.
It assumes you have already saved the workbook to OneDrive or SharePoint, shared it, and turned on AutoSave. It also assumes you know how Excel resolves two edits to the same cell and how sheet protection works.
The working model
Excel merges co-authors' changes at the level of individual cells. If two people edit different cells, both edits are kept. If two people edit the same cell, the edit that reaches the server last wins, and the other person's value is replaced. Nothing warns either person, so the fix is to make sure people rarely edit the same cell.
Structural changes carry more risk than typing. Inserting or deleting rows, renaming or deleting sheets, and sorting a range all change many cells at once, and they can shift the cells other people are working in.
A collaborative design therefore aims for three things:
- Give each person or team their own area to type in.
- Keep formulas and shared settings away from the places where people type.
- Keep structural changes to a small group of people.
Separate inputs, calculations, and outputs
Split the workbook into three kinds of sheets, and let only the first kind take open edits.
- Input sheets hold the raw entries. Each person or team gets one sheet, or one clearly bounded block of rows.
- Calculation sheets hold formulas that read from the input sheets. Lock them.
- Report sheets hold summaries and charts. Lock them too, so collaborators can read them but not change them.
- A settings sheet holds rates, thresholds, and lists. Only the workbook owner or an editor group should change it.
With this layout, the most common simultaneous action, typing data, happens in separate places. A mistake on one input sheet also stays contained.
Give each editor their own space
When several people need to add records to the same list, use an Excel table and a convention that avoids collisions:
- Add a column such as
OwnerorRegion, and agree that people edit only their own rows. - Have people add new records at the bottom of the table, not in the middle. Inserting rows in the middle moves cells that others may be editing.
- Use separate sheets when the number of editors is large or their work does not overlap.
Avoid merged cells in shared areas. A merged cell spans several grid cells, so an edit to one of them can collide with edits to its neighbors. Use "Center Across Selection" for the same look without merging.
Use Sheet Views for personal sorting and filtering
Sorting or filtering a shared range changes what everyone sees, and a sort rewrites many cells at once. Sheet Views (View tab > Sheet View > New) let each person apply a filter or sort that only they see. Tell collaborators to create a named view before they filter. Without a view, the filter applies to the shared sheet.
Protect what should not change
Protection reduces accidental damage in two ways. It stops people from editing cells outside their area. It also stops them from changing the workbook's structure.
- Select the cells people are allowed to edit, open Format Cells > Protection, and clear Locked. All cells are locked by default, but the lock only takes effect once the sheet is protected.
- Choose Review > Protect Sheet and set which actions remain allowed, such as selecting cells, formatting columns, or using filters.
- Choose Review > Protect Workbook to stop people from adding, deleting, renaming, or reordering sheets.
- To allow edits to specific ranges on a protected sheet, use Review > Allow Edit Ranges.
If you set a password on protection, store it somewhere other than the workbook. Protection is a guard against mistakes, not a security boundary. Anyone with edit access to the file can find ways around sheet protection. If some data must stay private, keep it in a separate file or restrict access through sharing permissions.
You can also protect the workbook with sharing permissions. Give most people view-only links and give edit access to the people who actually need it. See the earlier chapter on link types and permissions.
Reduce collision risk in formulas and structure
Several habits make shared workbooks more stable:
| Risk | Safer design |
|---|---|
| Two people edit the same input cell | Assign each person their own cells, rows, or sheet |
| Someone overwrites a formula | Lock formula cells and protect the sheet |
| Someone renames or deletes a sheet that formulas use | Protect the workbook structure |
| A sort or filter disrupts other editors | Use Sheet Views for personal sorting and filtering |
| Row insertions shift other people's cells | Add new records at the end of tables |
| Typos in shared lists | Use data validation drop-downs that read from a settings sheet |
| Formulas break when columns move | Use table references and named ranges instead of fixed addresses |
| Slow recalculation delays everyone's view | Avoid heavy volatile functions and very large whole-column formulas |
Data validation also helps with consistency. A drop-down list for status values means five editors cannot invent five different spellings of "Complete". Point the list at a range on the settings sheet so you can update it in one place.
Avoid links to other workbooks where you can. External links make the workbook slower and can cause update prompts for each person. If you need data from another file, consider Power Query or a dedicated import sheet that one person refreshes.
Document the workbook
A short "Read me" sheet saves many questions. Include:
- The purpose of the workbook and who owns it.
- Which sheets are for input, and who edits each one.
- Which sheets are locked, and who to ask for changes.
- Any conventions, such as "add rows at the bottom" or "use a Sheet View before filtering".
Use comments and @mentions for questions about specific cells, rather than typing notes into data cells. Notes typed into cells can break formulas and reports.
Check the AutoSave state with a macro
If your workbook includes a macro that does a bulk update, it should check first whether AutoSave is on. With AutoSave on, each step of the macro is saved to the cloud as it runs, and co-authors see partial results. This macro reports the current state:
Sub ReportAutoSaveState()
If ActiveWorkbook.AutoSaveOn Then
MsgBox "AutoSave is on. Edits are saved to the cloud automatically."
Else
MsgBox "AutoSave is off. Turn it on to co-author in real time."
End If
End SubWorkbook.AutoSaveOn is a property of the workbook. It returns True when AutoSave is on for the file. You could call it at the start of a larger macro and warn the user before changes begin. Test any macro in a copy first. Macros that run across a large range can also conflict with other people's edits.
A checklist before you share widely
- Inputs, calculations, and reports are on separate sheets.
- Each editor has a defined area.
- Formula cells are locked, and sheets are protected.
- The workbook structure is protected.
- Shared lists use data validation.
- There are no merged cells in shared areas, and no unnecessary external links.
- A Read me sheet explains the conventions.
- Link permissions give edit access only to people who need it.
- You have tested the workbook with at least two editors working at the same time.
Exercise
A team of four people records weekly sales in one shared table and a summary sheet adds up the results. Twice, one person's entries were replaced by another's, and someone once overwrote a total formula. Describe three design changes that would prevent these problems.
Show answer
First, give each person their own input sheet, or their own rows in the table identified by an Owner column, so that two people never type in the same cell. Second, put the totals on a separate summary sheet, lock the formula cells, and protect the sheet so that formulas cannot be overwritten. Third, protect the workbook structure, and have people add new records at the bottom of the table or use Sheet Views for sorting and filtering. Data validation for shared values and a Read me sheet that explains who edits what are good additions.
Exercise
Why is sheet protection not a good way to keep confidential data from collaborators who have edit access to the file?
Show answer
Sheet protection is meant to prevent accidental changes. A person with edit access can open the file, and the data remains visible and recoverable by other means. To keep data private, put it in a separate file or restrict access through sharing permissions.