Geometry: unique four-sided polygons

Scrapyard

New Member
Joined
Mar 7, 2013
Messages
16
Good Afternoon,

I'm trying to assign values (whole number > 0 but <= 5) to each side of a four-sided polygon (sides a, b, c, d) in which the values add up to the same total, such as 12. However, the polygon must be unique regardless of orientation.

One way I was visualizing this using Excel was to think of each row as a single polygon with Columns A, B, C, D as sides (making up a single array). However, I'm running into two basic problems:
- I am uncertain how to compare these arrays easily. If I use more columns to simulate a single rotation clockwise three additional times (columns E, F, G, H; I, J, K, L; M, N, O, P), I can compare across the four sets, looking for unique values. This seems like a very clunky way to accomplish this, and I haven't gotten in to work.
- Likewise, manually inputting in each value, hoping not to miss one, seems awfully arduous.

For example:
ABCD
13333
23324
33342
44233
Row 4 is not unique because it is the same as Row 3.

I appreciate any help anyone can offer in finding an easier way to accomplish this task (hopefully without VBA).
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
@Scrapyard Intriguing.
is the scale of this such that you are happy to enter values manually but would like an indication when a set is not unique?
You mention rotation in respect of orientation. Hence 3 and 4 are not unique.
What about 2, which is a flipped version of 3 and 4 ?
 
Upvote 0
@Scrapyard Intriguing.
is the scale of this such that you are happy to enter values manually but would like an indication when a set is not unique?
You mention rotation in respect of orientation. Hence 3 and 4 are not unique.
What about 2, which is a flipped version of 3 and 4 ?
Sorry if it wasn't clear...

Each four-sided polygon must be unique. The sides can be arranged differently as long as rotating it clockwise or counterclockwise does not produce the same result. I'm not sure about flopping or flipping.

Another way to visualize what I'm trying to do ... Consider the values are labels and not related to the size ... I'm attempting to cut out "squares" of paper (the top is white and bottom is black), put labeled numbers along the edge and centered on each side of the square (on the top/white) that add up to a given value (say 12), without any duplicates.

I am trying to see how these arrays are arranged and the total number of "squares" required.
Rich (BB code):
---3---        ---3---        ---3---       ---4---
|     |        |         |        |         |       |         |
3     3       4        3       2        3      3   x   2
|     |        |         |        |         |       |         |
---3---        ---2---        ---4---       ---3---
 
Last edited:
Upvote 0
Thanks. I will take a look later and see if I can make sense / offer any help.
Don't hold your breath! ;)
 
Upvote 0
@Scrapyard Ok, not sure if this helps or not?
Enter the Target in G1
Utilises helper columns H:M which you may hide.
Data validation limits Input in B:E to 1thro 5
Conditional formatting highlights any 'off target' row, in yellow.
Conditional formatting highlights any non-unique sets, in red.


Cell Formulas
RangeFormula
H2:H21H2=AND(SUM(B2:E2)<>$G$1,SUM(B2:E2)>0)
I2:I21I2=AND(J2>"",IF(COUNTIF(J2:M2,J2)=4,COUNTIF($J$1:$J$21,$J2)>1,COUNTIF($J$1:$J$21,$J2)+COUNTIF($J$1:$J$21,$K2)+COUNTIF($J$1:$J$21,$L2)+COUNTIF($J$1:$J$21,$M2)>1))
J2:J20J2=B2&C2&D2&E2
K2:K20K2=C2&D2&E2&B2
L2:L20L2=D2&E2&B2&C2
M2:M20M2=E2&B2&C2&D2
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet1!$E$4:$I$18H4, J4:M4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:M21Expression=$H2textYES
A2:M21Expression=$I2textNO
Cells with Data Validation
CellAllowCriteria
B2:E21Whole numberbetween 1 and 5


NB: Ignore the named range reference above. It is not relevant to this.
 
Upvote 0

Forum statistics

Threads
1,214,885
Messages
6,122,090
Members
449,065
Latest member
Danger_SF

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