Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2015, 11:41 PM
sandcharles sandcharles is offline select a cluster of point from a range based on x and y values Windows 7 32bit select a cluster of point from a range based on x and y values Office 2013
Novice
select a cluster of point from a range based on x and y values
 
Join Date: Nov 2014
Posts: 8
sandcharles is on a distinguished road
Default select a cluster of point from a range based on x and y values

Hi,

thanks in advance.

i want to find from the list the points which come in a particular region.


a1 3728 3077
a2 3867 3816
a3 3995 6134
a4 3995 6427
a5 3957 7534


a6 3874 7746
a7 3459 8373
a8 2925 9077
a9 2312 9077
a10 2298 9062
a11 1898 8361
a12 1667 7941

please look at the picture attached for my requirement.


Logic:

Find max x value and corresponding y. if more than 1 value is max go with max y value.
similarly do it for y
you have the rectangle. find the points which come within this range.
Attached Images
File Type: jpg upload.jpg (41.6 KB, 13 views)
Reply With Quote
  #2  
Old 02-16-2015, 11:13 AM
gebobs gebobs is offline select a cluster of point from a range based on x and y values Windows 7 64bit select a cluster of point from a range based on x and y values Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

Not a simple problem. Just to kick off the conversation, the way I see it...

Find max(x).
Find all rows where x = max(x)
Of these, find the row which has the max(y).

For your data, this will be...
3995 6427

Find max(y).
Find all rows where y = max(y)
Of these, find the row which has the max(x).

For your data, this will be...
2925 9077

The rectangle you want will have vertices that will be the four permutations (or is that combinations ) of these...
3995 9077
2925 9077
3995 6427
2925 6427

I think the points within this range are easily determined using a sumproduct formula.

Finding the location of the first max(x) is easy. If the data are in A,B,C...

=MATCH(MAX(B:B),B:B,0) which will return 3 (the row where the first instance of 3995)

Now, how do we find the other maxima, if any? Once we figure that out, the rest should fall in place.
Reply With Quote
  #3  
Old 02-16-2015, 10:27 PM
sandcharles sandcharles is offline select a cluster of point from a range based on x and y values Windows 7 32bit select a cluster of point from a range based on x and y values Office 2013
Novice
select a cluster of point from a range based on x and y values
 
Join Date: Nov 2014
Posts: 8
sandcharles is on a distinguished road
Default

i am looking for a macro which does the same thing
Reply With Quote
  #4  
Old 02-18-2015, 08:29 AM
gebobs gebobs is offline select a cluster of point from a range based on x and y values Windows 7 64bit select a cluster of point from a range based on x and y values Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

I've made some progress on this! See attached.
Attached Files
File Type: xlsx Region.xlsx (14.8 KB, 7 views)

Last edited by gebobs; 02-19-2015 at 06:13 AM.
Reply With Quote
  #5  
Old 02-19-2015, 12:09 AM
sandcharles sandcharles is offline select a cluster of point from a range based on x and y values Windows 7 32bit select a cluster of point from a range based on x and y values Office 2013
Novice
select a cluster of point from a range based on x and y values
 
Join Date: Nov 2014
Posts: 8
sandcharles is on a distinguished road
Default

you man are awesome gebobs. even this would do. lemme give it a try.

thanks,
sandcharles
Reply With Quote
  #6  
Old 02-19-2015, 06:15 AM
gebobs gebobs is offline select a cluster of point from a range based on x and y values Windows 7 64bit select a cluster of point from a range based on x and y values Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

Quote:
Originally Posted by sandcharles View Post
you man are awesome gebobs.
I know. I keep telling my wife that. ;-) TBH, I couldn't have done it without help from someone at the MrExcel message board.

Quote:
even this would do. lemme give it a try.
If you need any further help, lemme know.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color-fill a range of cells, based on text in a different sheet. Possible? unittwentyfive Excel 2 06-01-2014 06:48 AM
Find and Delete Rows based on a range damaniam Excel Programming 2 03-12-2014 06:06 AM
Way to select a range using the mouse on a chart? omahadivision Excel Programming 6 12-29-2012 09:21 AM
change values based on cell ubns Excel 1 05-21-2012 06:28 PM
select a cluster of point from a range based on x and y values comparing values from a range struct Excel 1 04-01-2011 07:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft