Break out numerical data range

K

kbforsythe

Hello~ I need some assistance with solving this issue, please.

I have been provided with an Excel worksheet containing 2 columns and
250 rows of data. Each row contains a numerical range. Column A
contains the first number of a range. Column B contains the last
number of the same range (please see example below).

Column A Column B
11234 11267
28210 28215
36748 36750
85726 86200

My task is to somehow "extract" all of the numbers within these
ranges, and place ALL numbers into a single column. This is the only
way that I will be able to import this data into my company's system.

I have looked EVERYWHERE for a formula. Any assistance would be
greatly appreciated.
 
D

Don Guillett

are you saying you want
11234
11235
etc to
11237
then
28210
28211
28212
etc to
28215
then
36748
 
G

Guest

with
A2:B5 containing your posted list:
11234 11267
28210 28215
36748 36750
85726 86200

Try something like this:
D1: =MIN($A$2:$A$5)

D2:
=IF(MAX($D$1:$D1)=MAX($B$2:$B$5),"",IF(ISNA(MATCH(D1,$B$2:$B$5,0)),D1+1,INDEX($A$2:$A$5,MATCH(D1,$A$2:$A$5,1)+1)))

Copy that formula down as far as you need.

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
D

Don Guillett

Assuming your data in a3:b6

Sub fillinbetween()
For Each c In Range("a3:a6")
nn = c.Offset(, 1) - c
lr = Cells(Rows.Count, "c").End(xlUp).Row + 1
Cells(lr, "c") = c
For i = 1 To nn
lr = Cells(Rows.Count, "c").End(xlUp).Row + 1
Cells(lr, "c") = c + i
Next i
Next c
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top