+ Reply to Thread
Results 1 to 4 of 4

How to create a custom function that creates a list like this {1,2,3,4,5,6,7,...}

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    How to create a custom function that creates a list like this {1,2,3,4,5,6,7,...}

    Hi everyone,
    I'm new to the forum. Also new to Excel macros and VBA stuff.
    Due to a project at work, I need to dig into this for the very first time.

    My problem is described as follows:
    Input: user specifies a column range which serves as the only argument for the function
    For example: E11:E20
    The function extracts the number of the rows this column range has, in this case, 10 rows.
    Output: The function creates a row array with 10 elements like this {1,2,3,4,5,6,7,8,9,10}

    I know the function ROW in Excel can do this in a similar way given that I choose the appropriate cell range.

    Sorry for my English. Would highly appreciate any help. Thank you.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: How to create a custom function that creates a list like this {1,2,3,4,5,6,7,...}

    Pl see the attached file with UDF.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to create a custom function that creates a list like this {1,2,3,4,5,6,7,...}

    hi
    are you trying to transpose the data? if so, why not use the transpose command?

  4. #4
    Registered User
    Join Date
    11-13-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to create a custom function that creates a list like this {1,2,3,4,5,6,7,...}

    Thanks, guys. I see what I can learn from what you've suggested.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1