+ Reply to Thread
Results 1 to 15 of 15

Getting list of numbers from value of 2 cells

  1. #1
    Registered User
    Join Date
    06-14-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Getting list of numbers from value of 2 cells

    Hi,

    I'm looking for way to create a list of sequenced numbers from value of two cells.
    I know I can drag manually from first cell till exact value, but it is not the best solution in my case.

    For example
    A1 cell contains number F1000 and B1 F2000

    in column C i get a list from range A1 to B1

    F1000
    F1001
    F1002
    F1003
    F1004
    etc
    F2000

  2. #2
    Forum Contributor Bhuvi's Avatar
    Join Date
    04-19-2013
    Location
    Delhi, India
    MS-Off Ver
    MS Excel 2003,07,10
    Posts
    153

    Re: Getting list of numbers from value of 2 cells

    Hi,

    do you want the list in cell C1 eg. F1000,F1001...,F2000 ? OR values in C1,C2,...C2000 as F1000,F1000...,F2000 ?

  3. #3
    Registered User
    Join Date
    06-14-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Getting list of numbers from value of 2 cells

    I want to get list F1000, F1001... F2000.

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Getting list of numbers from value of 2 cells

    does your text is going to vary in length or is it limited to only one character like in between A-Z
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  5. #5
    Forum Contributor Bhuvi's Avatar
    Join Date
    04-19-2013
    Location
    Delhi, India
    MS-Off Ver
    MS Excel 2003,07,10
    Posts
    153

    Re: Getting list of numbers from value of 2 cells

    Hi ,
    you can run the code in attached sheet by clicking the button, it populates a list in col c given the nos. would always be in 1000s.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If this helped and you wish to say thanks, then Please click on the Star* icon below this post.

  6. #6
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Getting list of numbers from value of 2 cells

    Bhuvi ! That's a good approach but how do you know text is always going to be one character in length or numbers are going to be only 4 character in length

  7. #7
    Registered User
    Join Date
    06-14-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Getting list of numbers from value of 2 cells

    Bhuvi, it is excactly as hemesh posted, first letter and number lenght is not always the same.
    But we are on a right course, cause list is generated in a way I was looking for.

  8. #8
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Getting list of numbers from value of 2 cells

    find attached !

    Hope this helps
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Getting list of numbers from value of 2 cells

    alternative approach could be using VBA
    though not too good in vba and still learning hope this could help

    this works same way the formula was working and excepts text in the left and all numbers in right.
    Attached Files Attached Files

  10. #10
    Forum Contributor Bhuvi's Avatar
    Join Date
    04-19-2013
    Location
    Delhi, India
    MS-Off Ver
    MS Excel 2003,07,10
    Posts
    153

    Re: Getting list of numbers from value of 2 cells

    Quote Originally Posted by Yahoho View Post
    Bhuvi, it is excactly as hemesh posted, first letter and number lenght is not always the same.
    But we are on a right course, cause list is generated in a way I was looking for.
    adjusted code for first letter and varying number length

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor Bhuvi's Avatar
    Join Date
    04-19-2013
    Location
    Delhi, India
    MS-Off Ver
    MS Excel 2003,07,10
    Posts
    153

    Re: Getting list of numbers from value of 2 cells

    Quote Originally Posted by hemesh View Post
    alternative approach could be using VBA
    though not too good in vba and still learning hope this could help

    this works same way the formula was working and excepts text in the left and all numbers in right.
    @Hemesh Thanks for sharing these two wonderful solutions (vba and nonVba)

  12. #12
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Getting list of numbers from value of 2 cells

    @Bhuvi ! Glad I could contribute a little bit !

    One more thing to notice is that if the text is only between the columns i.e. A till XFD then even a simpler approach can be taken with formula
    keep the formula only for text means keep formula below A1 then in c1 use
    =IFERROR($A$2&SMALL(ROW(INDIRECT($A$1&":"&$B$1)),ROW($A1)),"") hold control and shift then hit enter. then drag down

  13. #13
    Registered User
    Join Date
    06-14-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Getting list of numbers from value of 2 cells

    Quote Originally Posted by hemesh View Post
    alternative approach could be using VBA
    though not too good in vba and still learning hope this could help

    this works same way the formula was working and excepts text in the left and all numbers in right.

    hemesh this works really fine! Just one question - Is it possible to get full lenght of numbers - 0001, 0002, 0003? Now VBA changes numbers F1, F2, F3.

    Bhuvi in your new version it still doesn't change letter.

  14. #14
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Getting list of numbers from value of 2 cells

    Try Below
    Please Login or Register  to view this content.
    this will have four 0's before start
    Last edited by hemesh; 02-27-2014 at 07:34 AM.

  15. #15
    Registered User
    Join Date
    06-14-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Getting list of numbers from value of 2 cells

    Thanks you very much Bhuvi and hemesh, my problem is solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. formula for top four and bottom four numbers in a list without duplicating cells
    By eicdiana in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-08-2011, 03:51 PM
  2. Extract Numbers From RandLotto List Into Separate Cells
    By chelseasikoebs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2009, 09:18 PM
  3. List all the combinations of a group of cells containing letters, but not numbers
    By tanaka1986 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 02-12-2008, 06:38 AM
  4. Dividing Cells with list of numbers
    By scdaddy7269 in forum Excel General
    Replies: 3
    Last Post: 08-30-2006, 08:41 AM
  5. [SOLVED] Autofilter a list of numbers and blank cells
    By Cheryl in forum Excel General
    Replies: 3
    Last Post: 06-22-2006, 11:55 AM

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