If I have number 1 in A1 and number 10 in B1 how do i get sequential range in C1
Example C1 would have 1;2;3;4; and so on
Thank you,
Walter
If I have number 1 in A1 and number 10 in B1 how do i get sequential range in C1
Example C1 would have 1;2;3;4; and so on
Thank you,
Walter
Hi Walter,
welcome to the forum.
If you are doing this to consider / use a dynamic range where the reference starts from 1 through 10, you can use a dynamic name created with the help of Offset and Match functions.. share your purpose so that I can guide you accordingly. thanks.
Regards,
DILIPandey
<click on below 'star' if this helps>
DILIPandey, Excel rMVP
+919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com
I have a data base where I have 2 fields (beginning number and end number) I will have another field with range field where the range would be specified.
Example A1 has number 1 and B1 has 10 and C1 will have 1;2;3;4;5;6;7;8;9;10 in one cell. What would be the formula to do this?
Thanks again!
Walter01,
Welcome to the forum!
Attached is an example workbook based on the criteria you described. It does have headers, so the actual data starts in row 2. In cell C2 and copied down is this formula:
![]()
Please Login or Register to view this content.
FillNumbers is a UDF (User Defined Function) that has the following code in a standard module:
![]()
Please Login or Register to view this content.
How to use a UDF:
- Make a copy of the workbook the macro will be run on
- Always run new code on a workbook copy, just in case the code doesn't run smoothly
- This is especially true of any code that deletes anything
- In the copied workbook, press ALT+F11 to open the Visual Basic Editor
- Insert | Module
- Copy the provided code and paste into the module
- Close the Visual Basic Editor
- In a cell that will contain the formula, put =UDFName(UDFArgument1, UDFArgument 2, etc...)
I named this UDF FillNumbers
It has 3 arguments:
The first argument is the StartNumber (what number to start the fill with)
The second argument is the FinalNumber (what number to end the fill with)
The third argument is the delimiter used. This is an optional argument. If omitted, it will use a semicolon by default.
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks