+/- 1 when identifying pairs

mrphilippines1994

New Member
Joined
Dec 8, 2017
Messages
8
Hey guys - Need help here. kinda new here.

I need a formula to identify pairs with a +/- 1.

Example:

I'm looking for a pair with value of 100 but the only thing I have is 97,98,99 and 101. I need a formula where 100 will still be matched with the values 99 and 101.

Let me know if I'm still not clear. lol

cheers mate
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Not sure but does it detect decimal places? like if should be rounding things.

Hi, maybe you can have another go at explaining what you want, especially in regards to numbers with decimals. Try to include a couple of small examples and what the expected result would be for those examples.
 
Upvote 0
hello mate - so here it goes.

I have this reference value of 100 in one tab and the second tab i have available values of 104.50, 102.12, 98.35, 100.59 & 97.61.

I want to have a result where when I vlookup, it will match the 100.59 since there's a threshold of +/- 1 but I want it to return as 100 same as the reference number.

Hope it makes sense. tnx
 
Upvote 0
Hi, so if there is at least one match that is within +1 or -1 of the lookup value return the lookup value?

If so, here is one option that you can adapt to your two sheet set-up.


Excel 2013/2016
ABCD
1104.5100100
2102.12
398.35
4100.59
597.61
Sheet1
Cell Formulas
RangeFormula
D1=IF(COUNTIFS(A:A,">="&C1-1,A:A,"<="&C1+1),C1,0)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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