Forum Discussion
A 40,000+ VBA line Block and Stack workplace planning tool made in Excel
Hi all,
I’ve been an Excel user for a long time, but until the last 8 months I had never really explored the full power of Excel/VBA.
With AI’s help, I’ve been building a workplace Block and Stack planning tool called Work Stack. It’s a niche use case, but a very real one in my industry, supporting corporate office planners, workplace teams, and anyone trying to move and reorganise teams within an office.
When I first started, I thought an AI agent would simply be able to generate the answer for me. I quickly realised that wasn’t enough, especially when it came to reliably recreating the block and stack image and handling the planning logic behind it. That was when I decided to build it properly.
I have zero coding background, but 15+ years of workplace experience, so the setup became: AI as the code developer, and me as the product owner, logic lead, tester, and relentless breaker of whatever had just been built.
I moved very quickly at first and had a “working model” within about 6 weeks. The problem was that it produced all sorts of crazy results and was basically unusable, untestable, and unfixable. That was where I learned some hard lessons about relying too heavily on arrays and not being disciplined enough with separation of concerns.
Version 1 was a false start, but a very useful one. I scrapped it and rebuilt the tool properly from scratch. The rebuild took 6+ months rather than 6 weeks, but Work Stack is now at beta stage and is being tested and demoed by industry peers.
Attached are 3 images:
Image 1 — Current Stack
This is a standard desk-sharing workplace stack. It shows teams grouped into functions, some placed in neighbourhood zones, some co-located with other teams (shown with the two-headed arrow), and some “breached” teams shown with a red border where they are sharing desks more aggressively than the building guideline allows (80% in this example). There are also scattered spare desks shown in white blocks at the end of floors. As teams move, the team blocks, floors, and footer totals all recalculate automatically.
Image 2 — AutoStack Output
This is the result of running the most complex feature in the tool: AutoStack. It assesses the current stack and then restructures it based on the user’s instructions. In this example, I asked it to fix all breached teams, reunite teams with their function groups, dissolve neighbourhood zones and co-locations, and consolidate spare desks where possible. Something that would normally take a space planner weeks of effort can now be done by VBA in Excel in seconds. That part still blows me away.
Image 3 — Stack Editor
This is the main parent form, called Stack Editor. It acts as the control hub for creating, editing, and customising the stack. At the moment it has 37 features and counting.
Under the hood, the rebuilt version is structured far more seriously than the original. It uses an object-oriented VBA model built around core class modules for the plan, floors, and teams, with supporting classes for things like zones, functions, financials, and rendering. In other words, the stack is modelled as real objects rather than just spreadsheet rows.
I also rebuilt it with much stricter boundaries between logic, persistence, rendering, and UI. That discipline is what made the second version stable enough to keep growing, and it is a big part of why the codebase has now grown to 40,000+ lines without collapsing under its own weight.
I mainly wanted to share this with people who might appreciate this very specific use case in VBA. At some point I may need to port it to Python or something similar, but for now I’m honestly amazed at how far this 30-year-old language can be pushed.