Match 2 sets of data and return only if greater or less than 30 difference

TheLos

New Member
Joined
Aug 21, 2017
Messages
6
I have 2 sets of unmatched data, I need to match them based on their ID and then return any that are greater or less then 30 difference in "LEN".
Please help!

HTML:
GIS_IDGIS_STGIS_LENRM_IDRM_STRM_LEN88OWL FEATHER CT276.940638988OWL FEATHER CT31289TALON REACH CT381.681697889TALON REACH CT37392EAGLE WIND DR262.032984890PACKARD DR65593RUNNING WOLF WY485.258064891INDUSTRIAL AV36694PRAIRIE WOODS WY504.866214492EAGLE WIND DR25895RUNNING WOLF CT273.974147893RUNNING WOLF WY47696STEAMBOAT LN214.347712594PRAIRIE WOODS WY53497EAGLE WIND DR262.034008295RUNNING WOLF CT31598BLUE OAKS BL1870.94644296STEAMBOAT LN21599ROADHOUSE CT137.527620797EAGLE WIND DR256100STAGECOACH CI564.294259898BLUE OAKS BL1852104PRAIRIE WOODS WY377.057961199ROADHOUSE CT165105STEAMBOAT LN347.1145838100STAGE COACH CI557
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
GIS_IDGIS_STGIS_LENRM_IDRM_STRM_LEN
88OWL FEATHER CT276.940638988OWL FEATHER CT312
89TALON REACH CT381.681697889TALON REACH CT373
92EAGLE WIND DR262.032984890PACKARD DR655
93RUNNING WOLF WY485.258064891INDUSTRIAL AV366
94PRAIRIE WOODS WY504.866214492EAGLE WIND DR258
95RUNNING WOLF CT273.974147893RUNNING WOLF WY476
96STEAMBOAT LN214.347712594PRAIRIE WOODS WY534
97EAGLE WIND DR262.034008295RUNNING WOLF CT315
98BLUE OAKS BL1870.94644296STEAMBOAT LN215
99ROADHOUSE CT137.527620797EAGLE WIND DR256
100STAGECOACH CI564.294259898BLUE OAKS BL1852
104PRAIRIE WOODS WY377.057961199ROADHOUSE CT165
105STEAMBOAT LN347.1145838100STAGE COACH CI557

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>
 
Upvote 0
Your sample data - if that is indeed what it is - does not show what you want??
 
Upvote 0
Yes - that is sample data (sorry, I'm new to posting)

As an example:

ID's 88 match so calculate the difference in "LEN" (276.9 - 312 = -35), so then I want ID 88 returned. If there is no match, or difference is less than +/-30 then do not return.

I hope this makes sense...please let me know.
 
Upvote 0
OK sorry, didn't see that there were 2 tables there. TRy this...
A​
B​
C​
D​
E​
F​
G​
H​
1​
GIS_IDGIS_STGIS_LENRM_IDRM_STRM_LEN
2​
88OWL FEATHER CT
276.9406389​
88OWL FEATHER CT
312​
35.05936​
3​
89TALON REACH CT
381.6816978​
89TALON REACH CT
373​
4​
92EAGLE WIND DR
262.0329848​
90PACKARD DR
655​
5​
93RUNNING WOLF WY
485.2580648​
91INDUSTRIAL AV
366​
6​
94PRAIRIE WOODS WY
504.8662144​
92EAGLE WIND DR
258​
7​
95RUNNING WOLF CT
273.9741478​
93RUNNING WOLF WY
476​
8​
96STEAMBOAT LN
214.3477125​
94PRAIRIE WOODS WY
534​
9​
97EAGLE WIND DR
262.0340082​
95RUNNING WOLF CT
315​
41.02585​
10​
98BLUE OAKS BL
1870.946442​
96STEAMBOAT LN
215​
11​
99ROADHOUSE CT
137.5276207​
97EAGLE WIND DR
256​
12​
100STAGECOACH CI
564.2942598​
98BLUE OAKS BL
1852​
13​
104PRAIRIE WOODS WY
377.0579611​
99ROADHOUSE CT
165​
14​
105STEAMBOAT LN
347.1145838​
100STAGE COACH CI
557​
H2=IFERROR(IF(ABS(G2-INDEX(C:C,MATCH(E2,A:A,0)))>30,G2-INDEX(C:C,MATCH(E2,A:A,0)),""),"")
copied down as needed
 
Upvote 0
The bolded part of the formula is doing the heavy lifting...
=IFERROR(IF(ABS(G2-INDEX(C:C,MATCH(E2,A:A,0)))>30,G2-INDEX(C:C,MATCH(E2,A:A,0)),""),"")
The match is based in the ID, so if you just want he ID, perhaps this?
=IFERROR(IF(ABS(G2-INDEX(C:C,MATCH(E2,A:A,0)))>30,E2,""),"")
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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