chuckjitsu
New Member
- Joined
- Apr 24, 2015
- Messages
- 48
- Office Version
- 365
- 2016
Hello again. Here's what I'm looking at today. There's a 10x10 range, A1:J10. Within that range, there are 120 subranges of 5 cells each (A1:E1, A1:A5, etc.) that are just vertical/horizontal (no diagonals) and don't extend beyond row 10 or column J. Also within that same 10x10 range, there are 140 subranges of 4 cells each (A1:D1, A1:A4, etc.) that also are just vertical/horizontal (no diagonals) and don't extend beyond row 10 or column J. What I'm trying to find is the total number of non overlapping/intersecting 5 cell and 4 cell combinations in the main 10x10 range. So for example, A1:A5 and B2:E2 would be one valid combination whereas A1:E1 and B1:B4 would not be due to the intersection at B1.
The total number of combinations is 16,800 (120x140), but those include overlapping/intersecting ranges, which are combinations I don't want to include in the total count of 5 and 4 cell range combinations. I'm leaning toward a VBA solution, but I'm open to a worksheet solution if one of the wizards around here can figure that one out! Per usual, thanks in advance.
The total number of combinations is 16,800 (120x140), but those include overlapping/intersecting ranges, which are combinations I don't want to include in the total count of 5 and 4 cell range combinations. I'm leaning toward a VBA solution, but I'm open to a worksheet solution if one of the wizards around here can figure that one out! Per usual, thanks in advance.