PC Review


Reply
Thread Tools Rate Thread

Compare "like neighbourhoods"? Think outside the box?

 
 
HotRod
Guest
Posts: n/a
 
      29th Nov 2006
I have a really intersting request here and I'm wondering if there is an
excel answer before I go for a VBA one. I have a list of 100+ locations and
12 data variables that define demographic information. Is there a way to
sort the towns or query them so that I can find a town that most closely
resembles town #1 or has the closest maching variables?

e.g.
35320085 0.80 0.00 0.00 12.00 0.02 0.02 9.00 0.02 0.02 9.00 -0.15 0.15
8.00
35320087 0.82 -0.02 0.02 10.00 0.00 0.00 12.00 0.00 0.00 11.00 -0.17
0.17 6.00
35320088 0.82 -0.02 0.02 11.00 0.00 0.00 11.00 0.00 0.00 12.00 -0.17
0.17 7.00
35320090 0.65 0.15 0.15 5.00 0.17 0.17 5.00 0.17 0.17 5.00 0.00 0.00
12.00


 
Reply With Quote
 
 
 
 
Bernard Liengme
Guest
Posts: n/a
 
      29th Nov 2006
I would take each town and for every other town commute
SUM(ABS(diff_in_parm)) for all parms. Then for find which other town has the
lowest value for this statistic.
Unfortunately you would have 100! pairs to look at. This is about 10^158
which is possibly more than all the grains of sand on earth. If you compared
1 million in a second it would take about 8 universe-life-times.
Happy hunting and best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"HotRod" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a really intersting request here and I'm wondering if there is an
>excel answer before I go for a VBA one. I have a list of 100+ locations and
>12 data variables that define demographic information. Is there a way to
>sort the towns or query them so that I can find a town that most closely
>resembles town #1 or has the closest maching variables?
>
> e.g.
> 35320085 0.80 0.00 0.00 12.00 0.02 0.02 9.00 0.02 0.02 9.00 -0.15
> 0.15 8.00
> 35320087 0.82 -0.02 0.02 10.00 0.00 0.00 12.00 0.00 0.00 11.00 -0.17
> 0.17 6.00
> 35320088 0.82 -0.02 0.02 11.00 0.00 0.00 11.00 0.00 0.00 12.00 -0.17
> 0.17 7.00
> 35320090 0.65 0.15 0.15 5.00 0.17 0.17 5.00 0.17 0.17 5.00 0.00 0.00
> 12.00
>
>



 
Reply With Quote
 
Roger Govier
Guest
Posts: n/a
 
      29th Nov 2006
Hi

If you have a row above your data, you could, mark the row and apply
Data>Filter>Autofilter

Using the dropdowns, go to each variable in order of importance for your
selection, and select the same value as for town 1.
You will gradually filter down through the list until you get to none
selected at all. If so, go back 1 selection.
Rather than selecting the value for town 1 for any variable, you could
select Custom and give values Greater than or Equal and Less then or
equal values which are slightly below and slightly greater than the
target town's values.

--
Regards

Roger Govier


"HotRod" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a really intersting request here and I'm wondering if there is
>an excel answer before I go for a VBA one. I have a list of 100+
>locations and 12 data variables that define demographic information. Is
>there a way to sort the towns or query them so that I can find a town
>that most closely resembles town #1 or has the closest maching
>variables?
>
> e.g.
> 35320085 0.80 0.00 0.00 12.00 0.02 0.02 9.00 0.02 0.02 9.00 -0.15
> 0.15 8.00
> 35320087 0.82 -0.02 0.02 10.00 0.00 0.00 12.00 0.00 0.00
> 11.00 -0.17 0.17 6.00
> 35320088 0.82 -0.02 0.02 11.00 0.00 0.00 11.00 0.00 0.00
> 12.00 -0.17 0.17 7.00
> 35320090 0.65 0.15 0.15 5.00 0.17 0.17 5.00 0.17 0.17 5.00 0.00
> 0.00 12.00
>
>



 
Reply With Quote
 
HotRod
Guest
Posts: n/a
 
      29th Nov 2006
I was afraid these would be the answers. I'm trying to work with the user to
decide if all of the variables are weight equal or if some of them are more
important? I'm hoping that may help me assign a score to the towns.

When I remember my other question I'll need to ask that too...




"HotRod" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a really intersting request here and I'm wondering if there is an
>excel answer before I go for a VBA one. I have a list of 100+ locations and
>12 data variables that define demographic information. Is there a way to
>sort the towns or query them so that I can find a town that most closely
>resembles town #1 or has the closest maching variables?
>
> e.g.
> 35320085 0.80 0.00 0.00 12.00 0.02 0.02 9.00 0.02 0.02 9.00 -0.15
> 0.15 8.00
> 35320087 0.82 -0.02 0.02 10.00 0.00 0.00 12.00 0.00 0.00 11.00 -0.17
> 0.17 6.00
> 35320088 0.82 -0.02 0.02 11.00 0.00 0.00 11.00 0.00 0.00 12.00 -0.17
> 0.17 7.00
> 35320090 0.65 0.15 0.15 5.00 0.17 0.17 5.00 0.17 0.17 5.00 0.00 0.00
> 12.00
>
>



 
Reply With Quote
 
HotRod
Guest
Posts: n/a
 
      1st Dec 2006
This is turning out to be a lot harder than I expected. Time for me and the
user to have a talk. I think I may need to determine a single score for each
town and then assign it a colour on the map so that user can visualize the
relationship. Thanks for the ideas though.




"HotRod" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a really intersting request here and I'm wondering if there is an
>excel answer before I go for a VBA one. I have a list of 100+ locations and
>12 data variables that define demographic information. Is there a way to
>sort the towns or query them so that I can find a town that most closely
>resembles town #1 or has the closest maching variables?
>
> e.g.
> 35320085 0.80 0.00 0.00 12.00 0.02 0.02 9.00 0.02 0.02 9.00 -0.15
> 0.15 8.00
> 35320087 0.82 -0.02 0.02 10.00 0.00 0.00 12.00 0.00 0.00 11.00 -0.17
> 0.17 6.00
> 35320088 0.82 -0.02 0.02 11.00 0.00 0.00 11.00 0.00 0.00 12.00 -0.17
> 0.17 7.00
> 35320090 0.65 0.15 0.15 5.00 0.17 0.17 5.00 0.17 0.17 5.00 0.00 0.00
> 12.00
>
>



 
Reply With Quote
 
Harlan Grove
Guest
Posts: n/a
 
      1st Dec 2006
Bernard Liengme wrote...
>I would take each town and for every other town commute
>SUM(ABS(diff_in_parm)) for all parms. Then for find which other town has the
>lowest value for this statistic.
>Unfortunately you would have 100! pairs to look at. This is about 10^158
>which is possibly more than all the grains of sand on earth. If you compared
>1 million in a second it would take about 8 universe-life-times.

....

So don't compare them pairwise. If the 12 variables were denoted by
letters A to L, and the order of importance were G, E, C, A, B, D, F,
H, J, L, K, I, create a sort key by translating each variable to a
numeric 0-1 scale (e.g., x' = (x-MIN(xRng))/(MAX(xRng)-MIN(xRng))),
then concatenate their text representations as

=TEXT(g',"0.000")&TEXT(e',"0.000")&...&TEXT(i',"0.000")

This assumes that differences in variables are hierarchical, so that 2
records would be close if their G varaibles were close even if all
their other varaibles were far apart.

As for the OP's data, the OP is looking for the town closest to Town1,
and if there were N towns in the list, that requires only N-1
comparisons, and the entire list could be sorted by closeness to Town1.
And if the varaibles for Town1 and Town99 were in C2:N2 and C100:N100,
respectively, it may be more appropriate to use

=SUMXMY2(C$2:N$2,C$99:N$99)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two worksheets with "contains" and not "exact" values Fuzzy Microsoft Excel Worksheet Functions 1 4th Oct 2009 07:27 AM
How do I compare two times to see if one is "late" or "on time"? =?Utf-8?B?QXVkaXRvckdpcmw=?= Microsoft Excel Worksheet Functions 1 27th Jul 2005 05:59 PM
A way to get "Like" to use "Option Compare Text" without changing the setting for all my code? Linda Microsoft VB .NET 1 1st Apr 2005 03:31 PM
Re: Massive "FIND" or " Compare cells " then , Delete.... Angela Microsoft Excel Discussion 8 3rd Oct 2004 07:17 PM
PowerPoint 2003 "Compare and Merge" always says "merging..." in s. =?Utf-8?B?Wm9ycEZ1bmRDRU8=?= Microsoft Powerpoint 7 6th Sep 2004 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:36 PM.