Modeling tiles in a room using Excel Conditional Formatting

Share

Facebook
Twitter
LinkedIn

Last week we learned how to answer questions like, “How many tiles in a room?” using Excel. We learned about CONVERT function and fraction number format settings in Excel.

But why stop at calculation? We can even model a room full of tiles, thanks to Excel’s grid nature.

So today, we will learn how to create a room layout like this using Excel:

Demo of Tiles in a room Excel model

If you like the demo, read on to learn.

Step 1: Set up input cells

Inputs for room & tiles model in ExcelTo model tiles in a room, we need 4 inputs. Lets call them by below names.

  • room.length
  • room.width
  • tile.length
  • tile.width

Step 2: Calculate number of tiles required

The basic formula for calculating total tiles required is this:

=ROUNDUP((room.length*room.width)/(tile.length*tile.width), 0)

But this formula yields in an unrealistic solution as we do not want to have fractional tiles everywhere. So, a better way to calculate this is,

=ROUNDUP(room.length / tile.length,0) * ROUNDUP(room.width / tile.width,0)

Although this formula is technically correct, you may save a few tiles if you rotate the them.

That is,

ROUNDUP(room.length / tile.width,0) * ROUNDUP(room.width / tile.length,0) can be smaller than ROUNDUP(room.length / tile.length,0) * ROUNDUP(room.width / tile.width,0) in some cases, as shown in above demo.

So we need a way to flip tile dimensions if that saves us a few bucks. That is done by,

Step 3: Flipping tile dimensions with a switch

Insert a check box and link to a blank cell, say F6.

[Related: How to use a check box in Excel]

Now, using F6 value (either TRUE or FALSE), flip the values of tile.length & tile.width using IF() formula.

Step 4: Create a 100×100 grid

Although you can model the floor plan of entire Buckingham palace in Excel, lets restrict ourselves to rooms of size 100×100.

Select 101 columns and resize them small enough so you can see all of them in a single screen, like 10 pixels wide.

Select 101 rows and adjust their height so that you can see as many of them as possible in a single screen (10 pixels tall should do).

Type running numbers in first column & row. The final grid looks this this:

Floor tiles model in Excel by setting up 100x100 cell grid

Step 5: Modeling the room layout using conditional formatting

So we have a big 100×100 grid where we need to draw

  • Outer boundary for the room as per room.length & room.width
  • Inner tile boundaries as per tile.length & tile.width

Set up conditional formatting rules for room boundary

There are 4 rules required.

  1. Draw vertical left border if the topmost row = 1
  2. Draw vertical right border if the topmost row = room.length
  3. Draw horizontal top border if the left-most column = 1
  4. Draw horizontal bottom border if the left-most column = room.width

Below, see one of the rules.

Conditional formatting rule for room boundary explained

You can find other conditional formatting rules in the downloadable workbook.

Step 6: Modeling Tiles using conditional formatting

While we need 4 rules for the room boundary, we just need 2 rules for tile boundaries.

  1. Draw vertical right border if the topmost row value is divisible by tile.length
  2. Draw horizontal bottom border if the left-most column value is divisible by tile.width

We do not need rules for vertical left border or horizontal top border because they will be drawn by previous tile.

See one of the rules below:

Conditional formatting rule for tile borders explained

That’s all. Our room model is ready. Go ahead and see how it looks when tile it.

Download Example Workbook

Click here to download room tiles model workbook and play with it. Examine the conditional formatting rules to understand it better.

Do you apply Conditional Formatting in such creative ways?

I personally think conditional formatting is as good as honey, mangoes or dark chocolate. I love to use a dollop of it in all my Excel recipes.

What about you? Do you use conditional formatting for anything out-of-box 😉 like this? Please share your tips using comments.

Want more? Check out these conditional formatting examples

If you want more on conditional formatting you are in luck. Check out,

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.

8 Responses to “Create a Combination Chart, Add Secondary Axis in Excel [15 Second Tutorial]”

  1. [...] Select the “daily completed” column and add it to the burn down chart. Once added, change the chart type for this series to bar chart (read how you can combine 2 different chart types in one) [...]

  2. [...] set the height series to be plotted on secondary axis. Learn more about combining 2 chart types and adding secondary axis in [...]

  3. [...] To show the years, I have used another dummy series and plotted it on secondary axis (related: how to add secondary axis?) [...]

  4. Thanks for this one!

  5. [...] Choisissez la colonne « Daily Completed » et ajoutez-la au graphique. Une fois ajoutée, changez le type de graphique pour cette série à histogramme (lisez comment combiner 2 types de graphiques en un : combine 2 different chart types in one) [...]

  6. Nat says:

    How do i create a chart that has negative numbers on axis x and y and plot them correctly? I cannot seem to understand how to do this, please help.
    Thanks.

    Nat

  7. MSWebReviewer says:

    You can also plot 2 or more Y axes in Excel using EZplot or Multy_Y from Office Expander.com
    There is a demo version to try.
    Cheers.

Leave a Reply