+ Reply to Thread
Results 1 to 4 of 4

how to save a range of cell values

  1. #1
    vhrao
    Guest

    how to save a range of cell values

    I have a list with several options. I also have a defined fixed range
    of cells. For each option in the list I want to store the values
    entered by user inside the range of cells. Basically I want to maintain
    an array where each array element can store values for the defined
    range of cells
    How can I do this? Thanks for you help.


  2. #2
    Tom Ogilvy
    Guest

    Re: how to save a range of cell values

    Dim rng as Range, i as Long
    set rng = Worksheets("Sheet1").Range("B9")
    for i = 1 to 5
    rng.offset(i-1,0).Value = userform1.Controls("Textbox" & i).Value
    Next


    obviously there is not enough detailed information to give you anything like
    a substantive answer.

    --
    Regards,
    Tom Ogilvy




    "vhrao" <[email protected]> wrote in message
    news:[email protected]...
    >I have a list with several options. I also have a defined fixed range
    > of cells. For each option in the list I want to store the values
    > entered by user inside the range of cells. Basically I want to maintain
    > an array where each array element can store values for the defined
    > range of cells
    > How can I do this? Thanks for you help.
    >




  3. #3
    vhrao
    Guest

    Re: how to save a range of cell values

    Sorry I did not put in my problem properly. I am explaining it now.

    I have five options stored in a list at cell $E$20
    When user selects say Option1 from the list, I want to get the user
    entered - six values from cells in range $C$24:$E$25, in the first
    array element
    When user selects say Option2 from the list, I want to get the another
    set of six values from the cells entered by the user - range
    $C$24:$E$25, in the second array element
    .... so on
    for all the five options I have to store the values from the same six
    cells, in five different array elements.

    As you can see, User can supply different values in the cells for each
    option.

    I hope I have explained the scenario clearly.

    Can you please give me the solution. Thanks


    Tom Ogilvy wrote:
    > Dim rng as Range, i as Long
    > set rng = Worksheets("Sheet1").Range("B9")
    > for i = 1 to 5
    > rng.offset(i-1,0).Value = userform1.Controls("Textbox" & i).Value
    > Next
    >
    >
    > obviously there is not enough detailed information to give you anything like
    > a substantive answer.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    >
    > "vhrao" <[email protected]> wrote in message
    > news:[email protected]...
    > >I have a list with several options. I also have a defined fixed range
    > > of cells. For each option in the list I want to store the values
    > > entered by user inside the range of cells. Basically I want to maintain
    > > an array where each array element can store values for the defined
    > > range of cells
    > > How can I do this? Thanks for you help.
    > >



  4. #4
    vhrao
    Guest

    Re: how to save a range of cell values

    Sorry I did not put in my problem properly. I am explaining it now.

    I have five options stored in a list at cell $E$20
    When user selects say Option1 from the list, I want to get the user
    entered - six values from cells in range $C$24:$E$25, in the first
    array element
    When user selects say Option2 from the list, I want to get the another
    set of six values from the cells entered by the user - range
    $C$24:$E$25, in the second array element
    .... so on
    for all the five options I have to store the values from the same six
    cells, in five different array elements.

    As you can see, User can supply different values in the cells for each
    option.

    I hope I have explained the scenario clearly.

    Can you please give me the solution. Thanks


    Tom Ogilvy wrote:
    > Dim rng as Range, i as Long
    > set rng = Worksheets("Sheet1").Range("B9")
    > for i = 1 to 5
    > rng.offset(i-1,0).Value = userform1.Controls("Textbox" & i).Value
    > Next
    >
    >
    > obviously there is not enough detailed information to give you anything like
    > a substantive answer.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    >
    > "vhrao" <[email protected]> wrote in message
    > news:[email protected]...
    > >I have a list with several options. I also have a defined fixed range
    > > of cells. For each option in the list I want to store the values
    > > entered by user inside the range of cells. Basically I want to maintain
    > > an array where each array element can store values for the defined
    > > range of cells
    > > How can I do this? Thanks for you help.
    > >



+ 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