Results 1 to 3 of 3

Create shorter vector from a vector of unknown length

Threaded View

agentred Create shorter vector from a... 04-15-2010, 11:35 AM
StephenR Re: Create shorter vector... 04-15-2010, 12:18 PM
agentred Re: Create shorter vector... 04-15-2010, 12:53 PM
  1. #1
    Registered User
    Join Date
    01-17-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    67

    Create shorter vector from a vector of unknown length

    Hey folks,

    I'm having trouble figuring this out:
    I have a value in Cell A1, say 3.

    What I want is a list of the first three odd numbers. If A1 = 7, then the first seven odd numbers.

    I'm not sure how to go about this... I thought of creating a vector twice the length

    For i = 1 to cella1value*2
    vector(i) = i
    Next i
    and then mapping the values of this vector in to a value of smaller length, maybe using the step modifier. But I'm not sure how to map the second value of a vector to the first value of another vector and so on.

    Does this make sense? Is there a simpler way of doing this? All thoughts appreciated, many thanks,

    AR



    But I'm
    Last edited by agentred; 04-15-2010 at 02:30 PM.

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