Auto Fill the Range Between 2 Cells

Closed
JIN - Feb 7, 2009 at 11:52 PM
 JIN - Feb 13, 2009 at 12:09 AM
Hello,

My Question is

I Have Put One Range Like " 1 " in One cell and ending series " 10 " in next cell . Now I want the excel To Auto Complete the Range from 1 to 10 and put it in another cell . Please tell me how can I do that.

Secondly If I only put one Data in One cell how can I make excel to auto fill the Entire series Automacially without using Autofill option manually but dragging the cell horizontally or vertically.

Your Help will be appreciated
Related:

1 reply

I'm not sure this answers your question, but this will fill the range from A1:A10 with the numbers
one throught ten.

Private Sub FillRange()

Dim i
i = 1

Do While I < 11

Range("A" & i) = i

i = I + 1

Loop

End Sub

I'm not sure about your second question. If you put data in one cell and then use Autofill, Excel assumes that is the data you want to fill in the range.
Example:
If you put the number 1 in cell A1 and then use autofill to range A10, Excel will fill the whole range with the number 1.

If you put the number 1 in cell A1 and the number 2 in cell A2, highlight both cell A1 and A2 then use Autofill,
then you are giving a "Step" value, so excel will fill the range 1,2,3,4....... until you stop Autofill.
8
Can you please eloborate a bit more where to use this dim function

Perhaps , an example will be very easy for me to understand . If Possible can you please make an excel file and share it here so that I can have a look on it and understand . with the same scenario which I mention earlier.
0
Example given in the following file.
I have given a brief description of the code.
Click on the command button in the file to see the code run.



[URL=http://www.4shared.com/file/86380706/bb072625/Example.html]Example.xls[/URL]
0
Nope I still cant get it.

You have mention this Forumula Earlier.

Please make an Example like this

I have Two Colums

In Cell A1 I ENTER NUMBER 100
IN Cell B1 I Enter Number 150

Now I want the Entire Number in between Cell A1 And Cell B1 to be Appear Automatically in Cell A3 or Any Other cell where I want to Put , without doing Manually

Please make an excel and Share
0
I guess I'm having a hard time understanding.
If you just want to sum the numbers in A1 and B1 then type a sum formula in A2 such as,

=SUM(A1,B1)

See the attached file. Change the numbers in A1 and B1 to see if that is what you want.


[URL=http://www.4shared.com/file/87067689/e0a72449/Example.html]Example.xls[/URL]
0
Nope thats a Sum fomula I know that

have a look at this


100 150

101
102
103
105
105
106
107

This Above range from 100 to 150 Should appear when I enter the first 100 and enter the Lase 150 .And this range I want it to appear in any cell where I want this range to appear when I enter the first and last number
0