help with a formula

hilyete

Active Member
Joined
Aug 19, 2009
Messages
293
My project has a "Checkerboard" with 8 columns x 8 Rows. Each "square" is numbered (1 to 64). I need to be able to determine how many diagonal spaces there are going up to the left from any space chosen on the board. So, for example, if square 30 is chosen, there would be 3 squares diagonally left: 21, 12, 3. Obviously there is a pattern of -9 from one to the next. But is there a formula that would calculate the number of diagonal spaces, staying inside the board? If I chose 64, there would be 7 spaces, but if I chose 26, there would be only 1. I can see there are patterns to this, but can't come up with a formula to do it. Can anyone help me out?
 

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
Try this.

Excel Workbook
CDEFGHIJKLMN
3
412345678Sq NoCount
5910111213141516303
61718192021222324647
7252627282930313230
83334353637383940250
94142434445464748232
104950515253545556523
115758596061626364
12
Upper Left Count
 

Watch MrExcel Video

Forum statistics

Threads
1,122,719
Messages
5,597,734
Members
414,170
Latest member
Mdm

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
Top