Classifying points within a polygon

buckers99

New Member
Joined
Oct 15, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hey Guys, new to this forum but used to using stack overflow so apologies if I mess up a little.

I have a table containing 2 variables, (X, Y), they can be any number from 0 to 100.
XY
20100
112


I need to classify them based on if they lay within a range on a graph, a little like the soil classification triangle. I have included the example below:
plot.png


I have managed to nest IF and AND functions but this does not account for the diagonal seen in boxes C, D, and E.

Here is my function :
=IF(AND(B24<=100,C24>=50),"A",IF(AND(B24<=100,C24>35),"B",IF(AND(B24<=100,C24>25),"C",IF(AND(B24<=100,C24>10),"D","E"))))

Ideally this is what the end table looks like:
20100A
15E
etc...

Any help will be greatly received.

B
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
If anyone looks back at this, I worked it out:

=IF(B1>=50,"A",IF(B1>=35,"B",IF(B1>=25,"C",IF(B1<=6,"E",IF(AND(B1>=10,B1<=20),"D",IF(AND(A1>=50,B1>=20),"D",IF(AND(A1>=50,B1>=6),"C",IF(AND(A1<50,B1>6,B1<10),IF(B1>0.08*A1+6,"D","E"),IF(AND(A1<50,B1>20,B1<25),IF(B1>0.1*A1+20,"C","D"))))))))))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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