Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Extracting data/numerical values from a give list

On Fri, 1 Dec 2006 05:05:01 -0800, Dee wrote:

Need help with the following:
I have a given list of 5 digit random numbers starting with
00001 and ending with 99999
I need to be able to review my list example below:
10211
10219
11040
11089
and figure out from 00001 to 99999 what numbers are missing from the
beginning and end of the data stream. This seems easy - 00001 to 10210 -
then start up again at 11090 to 99999. The problem occurs when I try to pull
in all the missing data between 10211 and 10219. I need to be able to set a
criteria then extract all the data from a given set of numbers, which will
create a new list of numbers. This is not a process that can be done
manually due to the size of the main data source (50,000 lines of code)

Please help............


Brute force?

==========================
Option Explicit

Sub MissingNumbers()
Dim i As Long, j As Long
Const LowerLimit As Long = 1
Const UpperLimit As Long = 99999
Dim List As Range
Dim Output As Range

Set List = Range("A2:A100")
Set Output = Range("B1")

j = 0
For i = LowerLimit To UpperLimit
If Application.WorksheetFunction.CountIf(List, i) = 0 Then
j = j + 1
Output.Offset(j, 0).Value = i
End If
Next i

End Sub
=============================


--ron
Reply
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
Extracting data that is not numerical DMW[_2_] Excel Worksheet Functions 3 January 28th 09 02:11 PM
How do I give numerical values to each text item in a list Tomj37 Excel Discussion (Misc queries) 1 August 4th 08 07:21 PM
How can I give a numerical value to a radio button? trainer07 Excel Discussion (Misc queries) 4 June 27th 08 05:28 AM
extracting numerical data sroehl Charts and Charting in Excel 1 August 17th 05 05:04 PM
Extracting Values on one list and not another B Schwarz Excel Discussion (Misc queries) 4 January 7th 05 01:48 PM


All times are GMT +1. The time now is 03:09 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"