Formula for Grid Edges

Ambg

New Member
Joined
Jul 3, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi everybody

Hoping you can help where my brain has failed!

I’m looking for a formula I can use that lets me count the number of edges in a grid of variable size.

So ideally, I’d like to have two inputs (example in A1 and A2 where I could put a 2 in A1 and a 2 in the A2 for a 2x2 grid) and the output would then give me the number of edges of a grid in this formation. In this case, 12.

But then I could input in a 3 and a 4, and the output would amend to this new size, and give me an edge count of 31.

All help appreciated! Not even sure if this is doable, but hopefully it is!
Thanks in advance!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Welcome to the Forum!

If your grid dimensions are m x n, then you'll have 2mn + m + n edges.

AB
13
24
331edges
Sheet1
Cell Formulas
RangeFormula
A3A3=2*A1*A2+A1+A2
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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