LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default find all the possible differences equals to 3

P.S......

If you want the comparison value to be variable, instead of hardcoding it
into the formula use a cell to hold that variable and then just refer to
that cell.

Biff

"T. Valko" wrote in message
...
When I filter this set of data, the function can locate
5 and 9 but can not locate 5409 and 5413.


It works for me. See this screencap:

http://img265.imageshack.us/img265/4...numbers8zc.jpg

I suspect you didn't modify the formula correctly for the different data
set.

Biff

"Jason" wrote in message
...
Hi,

Thanks for the input, I used your way to filter my data, but instead of
3, I
filtered for 4. The function you provided works well on small number but
does
not work on big numbers. For example
5 9
3018 1423
4107 5025
4306 5413
5409 13199
15027 19841
18823 25813
23404 25948
27633 26083
42219
42343
42829


When I filter this set of data, the function can locate 5 and 9 but can
not
locate 5409 and 5413.
All my numbers are whole number and none negative. number in both A and B
are both listed from smallest to biggest. Total Entry of A can be
smaller,
bigger or equal to B.
Is there a way I can solve this problem?

"T. Valko" wrote:

This seems to do what you want:

Enter this formula in D1 as an array using the key combination of
CTRL,SHIFT,ENTER (not just ENTER):

=IF(ISERROR(SMALL(IF(ISNUMBER(MATCH(A$1:A$4+3,B$1: B$4,0)),ROW(A$1:A$4)-MIN(ROW(A$1:A$4))+1),ROWS($1:1))),"",INDEX(A$1:A$4 ,SMALL(IF(ISNUMBER(MATCH(A$1:A$4+3,B$1:B$4,0)),ROW (A$1:A$4)-MIN(ROW(A$1:A$4))+1),ROWS($1:1))))

Enter this formula in E1:

=IF(D1="","",D1+3)

Select both D1 and E1 and copy down until you get blanks.

Biff

"Jason" wrote in message
...
Hi,

I have two column of number, A and B. I would like to find all the
possibility for (# in B)- (#in A) is equal to 3 then return the
corresponding
numbers.

e.g

A B
1 3
2 4
5 8
7 13

4-1=3, return 1 & 4
8-5=5, return 5 & 8

Any input would be helpful
Jason









 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I find the differences in two spreadsheets ritalc Excel Discussion (Misc queries) 0 February 15th 06 04:20 PM
Find and Replace blakrapter Excel Worksheet Functions 3 December 15th 05 12:25 AM
Code needed to find records from bottom up Andy Excel Discussion (Misc queries) 4 December 5th 05 03:27 AM
How do I find differences between two excel worksheets? jfurneaux New Users to Excel 1 March 10th 05 02:05 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"