Grid Pattern

JSW

New Member
Joined
Jun 11, 2024
Messages
4
Office Version
  1. 2011
Platform
  1. Windows
How would I go about creating and brick like grid pattern that I can use to design block layouts.
Thanks,
Jeff
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
How would I go about creating and brick like grid pattern that I can use to design block layouts.
Thanks,
Jeff

Hi Jeff, welcome to the forum.

This is a MS Excel forum, not a LEGO forum. Please put your question in a form that we can all understand.
 
Upvote 0
Hi Jeff, welcome to the forum.

This is a MS Excel forum, not a LEGO forum. Please put your question in a form that we can all understand.
I know this is an Excel forum. I simply would like to know how to set up the grid lines in a brick style pattern. Not sure how else to ask it.
Jeff
 
Upvote 0
Change as required
Code:
Sub Maybe()
Dim i As Long, j As Long
For i = 1 To 26
    For j = 1 To 35 Step 2
        Sheets("Sheet1").Shapes.AddShape msoShapeRectangle, Columns(i).Left, Rows(j).Top, Columns(i).Width, Rows(j).Height
        Sheets("Sheet1").Shapes.AddShape msoShapeRectangle, Columns(i).Left + 0.5 * Columns(i).Width, Rows(j + 1).Top, Columns(i).Width, Rows(j).Height
    Next j
Next i
End Sub
 
Upvote 0
Change as required
Code:
Sub Maybe()
Dim i As Long, j As Long
For i = 1 To 26
    For j = 1 To 35 Step 2
        Sheets("Sheet1").Shapes.AddShape msoShapeRectangle, Columns(i).Left, Rows(j).Top, Columns(i).Width, Rows(j).Height
        Sheets("Sheet1").Shapes.AddShape msoShapeRectangle, Columns(i).Left + 0.5 * Columns(i).Width, Rows(j + 1).Top, Columns(i).Width, Rows(j).Height
    Next j
Next i
End Sub
I am not sure how to do this. I’m not a power user and was thinking it would just be some settings to change
Jeff
 
Upvote 0
You cannot change the grid lines, so they overlap.
 
Upvote 0
The best you might be able to do is going to be all manual. Use two column widths for 1 brick width and one row height for 1 brick height, then add borders/colors as you need for your layout?

I do this frequently, but I usually resize the cells to squares. ( I resized the columns to 40px below so the width is only 2x the height )

1718205317539.png
 
Upvote 0
Re: "I am not sure how to do this"
Search for "How to install and run a macro in excel" or something similar.
Run the code supplied and come back with pertinent questions.
 
Upvote 0
I am not sure how to do this. I’m not a power user and was thinking it would just be some settings to change
Jeff
Hit Alt-F11
From the menu bar, click on Insert, then Module
Copy the code above and paste into the window.
Hit Alt-q to close the Visual Basic Editor

When back at the sheet, hit Alt-F8
Select the macro named Maybe and click Run
 
Upvote 0

Forum statistics

Threads
1,221,618
Messages
6,160,873
Members
451,674
Latest member
TJPsmt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top