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 07:36:00 -0800, Dee wrote:

Hello Ron,
Thanks for the infro - I am still a little new in the coding area, but I was
able to edit the VB and tighten it up so my out put didnt exceed the excel
sheet.

Here's another one for you:
Now I have a list of codes where
10122
10123
10124
10125
10126
and I need to place them in code span arrangement. Example my output list
in column B is now listing all codes that are not found in the main search,
but I need to list them in a span 10122 - 10126, then if there is another
code 10128 that falls out of my range list it alone. place that code alone
10128 - 10128, then continue parsing through my list to find all numbers that
fit within a range and list them accordingly. 10130 - 10250
Example:
10122 - 10126
10128 - 10128
10130 - 10250
If you noticed 10127 and 10129 are not present in my list - that is due to
their main origin in list number. List number two - pulled them out via the
criteria set in your declaration.

Thank you




It's just a matter of using appropriate loops to check all the values.

What is this for?


=============================
..
..
..
'set up ranges
lSpan = LowerLimit
j = 0
For i = LowerLimit To UpperLimit
Do While Application.WorksheetFunction.CountIf(List, i) = 0
i = i + 1
If i UpperLimit Then Exit Do
Loop
j = j + 1
sOutput.Offset(j, 0).Value = lSpan & " - " & i - 1
Do Until Application.WorksheetFunction.CountIf(List, i) = 0
i = i + 1
Loop
lSpan = i
Next i
..
..
..
================================
--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:46 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"