how to save a range of cell values

  • Thread starter Thread starter vhrao
  • Start date Start date
V

vhrao

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.
 
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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top