View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ElsiePOA[_2_] ElsiePOA[_2_] is offline
external usenet poster
 
Posts: 1
Default Find Non-consecutive numbers in list

One Way -

Assuming your list of invoice numbers is in cells A1:A1000 on Sheet
and that they are sorted in numerical order -

On Sheet2 enter the following formula in A2
=IF(SHEET1!A2=SHEET1!A1+1,"",SHEET1!A1+1).

Copy this formula down to cells A3:A1000 on SHEET2 and you will have
list of all missing invoice numbers with the other cells all blank. I
you want to remove all of the blank cells, just sort A2:A1000 i
ascending order and your list will be in consecutive cells at the to
of the column

--
Message posted from http://www.ExcelForum.com