Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extracting data that is not numerical | Excel Worksheet Functions | |||
How do I give numerical values to each text item in a list | Excel Discussion (Misc queries) | |||
How can I give a numerical value to a radio button? | Excel Discussion (Misc queries) | |||
extracting numerical data | Charts and Charting in Excel | |||
Extracting Values on one list and not another | Excel Discussion (Misc queries) |