+ Reply to Thread
Results 1 to 7 of 7

Array for Finding Prime numbers in a cell

  1. #1
    Forum Contributor
    Join Date
    06-24-2012
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    302

    Array for Finding Prime numbers in a cell

    Hello Experts,
    Is array possible to get following Prime numbers from a given cell?

    1,2,3,5,7,11,13,17,19,23,25,27,29,31,37,41,43

    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Array for Finding Prime numbers in a cell

    1 isn't prime, but aside from that, you want a list of prime numbers?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    06-24-2012
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    302

    Re: Array for Finding Prime numbers in a cell

    Hi SHG,
    Thanks ! I thought 1 is prime number...
    I want only up to 43 and not beyond,
    Thxs,
    Karnik

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Array for Finding Prime numbers in a cell

    You already have that list ...

  5. #5
    Forum Contributor
    Join Date
    06-24-2012
    Location
    Australia
    MS-Off Ver
    Office365
    Posts
    302

    Re: Array for Finding Prime numbers in a cell

    Hi SHG,
    My data in columns is up to 2080 nos and numerous cell contains individual prime number...
    I wish to copy in new cell.. some how my following formula is incorrect ( I use Excel 2007)

    =IF(A1={2,3,5,7,11,13,17,19,23,25,27,29,31,37,41,43},A1,"")
    THX
    Karnik

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Array for Finding Prime numbers in a cell

    change that to a vlookup, and put the primes in theor own table...

    =IFERROR(VLOOKUP(A1,C2:C8,1,FALSE),"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Array for Finding Prime numbers in a cell

    happy to help, and thanks for the rep

+ 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