![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
Hi,
Here is the problem. I have ranges of numbers. I need to explicitly state the numbers contained within the range. Here is an example Col A | Col B 1 10 34 50 67 80 Through some Excel Magic the resulting data set would like this. 1 2 3 . . . 10 34 35 36 . . . 50 etc etc etc Thanks ! Saadi |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Try the following:
Dim start, finish, counter As Integer For h = 1 To 3 start = Range("a" & h) finish = Range("b" & h) For i = start To finish counter = counter + 1 Range("C" & counter).Value = (i) Next i Next h Change the "3" in "h=1 to 3" to the number of series that you want to fill. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
Hi,
Thanks for the advice. I ended up writing a formula that would add one to a start number until it was = to the very last number that I wanted to reach. This filled in the range for me. Saadi |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|