![]() |
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. |
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" wrote in message oups.com... 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. |
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" wrote in message oups.com... 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. |
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" wrote in message oups.com... 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. |
All times are GMT +1. The time now is 11:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com