View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Khoshravan Khoshravan is offline
external usenet poster
 
Posts: 211
Default A Macro to find missing serial numbers in a column

Dear Max
Thanks for your nice and talented solution.
It gives 2 missing numbers so I understand that my colleague has typed 116
three times for 114 and 115. Also 2 other number numbers are reported which
is not in my A:A column. Last two numbers, 175, 176. Anyway that is minor
issue beyond my need.
But more interestingly I would like to understand the logic beyond your
solution. Although your solution is two simple combination of commands but it
seems very complicated for me and beyond my knowledge to understand. If
possible please give some hints what these commands do. Thanks a lot.
--
Rasoul Khoshravan Azar
Kobe University, Kobe, Japan


"Max" wrote:

One option using non-array formulas ..

Assume source numbers are listed in A2 down
(A1 assumed empty or containing a text col header)

Using 2 empty cols to the right, eg cols E and F

Put in E2:
=IF(A2="","",IF(ISNUMBER(MATCH(ROW(A1),A:A,0)),"", ROW()))
Copy E2 down by 175* rows to E176
*this number is assumed known

Then place in F2:
=IF(ROW(A1)COUNT(E:E),"",INDEX(E:E,SMALL(E:E,ROW( A1)))-1)
Copy F2 down until "blanks" appear
The missing serial numbers will be extracted at the top in col F
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Khoshravan" wrote:
In a column, serial numbers are typed as a reference. For example from 1 to
173. How ever actual number of raws is 175 (obvious by checking raw numbers).
2 numbers are missing. Let say for example 17 and 56 are not typed.
What is the easiest way to find these raws?
Is there any written MAcro, to find these raws?
--
Rasoul Khoshravan Azar
Kobe University, Kobe, Japan

A Macro to find missing serial numbers in a column