View Single Post
  #8   Report Post  
Max
 
Posts: n/a
Default

For the pair of numbers input into A2:B2 :
C2 will return the row number of the last occurrence in Sheet1
D2 will return the row number of the 2nd last occurrence in Sheet1
E2 will return the number of rows in-between the last and the 2nd last
occurrence in Sheet1


The test results (below) seems to reconcile with expected results
based on the source data as originally posted,
with typo corrected for line:

ROW99 50 53 57 62 63 68 70 71 73


to be
ROW99 50 53 57 62 63 68 70 72 73


Paired inputs in A2:B2 returns in: C2 - D2 - E2
-----------------------------------------------
72,73 returns: 99 - 94 - 4
50,51 returns: 80 - 31 - 48
68,69 returns: 83 - 50 - 32
80,81 returns: 83 - 31 - 51

(Paired inputs can be in any order: 73,72 or 51,50 etc)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----