assign values to a list of named ranges

davido1000

New Member
Joined
Jan 8, 2003
Messages
2
I have an excel application that has a couple of hundred defined names that each hold a single piece of data. All these pieces of data come from values entered into userforms.

for examlple
Range: sheet1!A1
Named Range: "data1"
Value: True

Some values are strings, some are numbers, etc.

I would like to use the application with several sets of data and store the data in another workbook that could be loaded.

Here is what I need and I haven't been able to get work in VBA.

Set up 3 colums with the following information in each column.

worksheet, range name, value
sheet1 , data1, True
sheet1 , data2, False
sheet1 , data3, 7
sheet2 , data4, 1,200


I need a routine that will loop through the list and assign the value to the correct named range.

Any help is appreciated.

Thanks.

david
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
hi!
Try this!
Code:
   for i=1 to range("A65536").end(xlup).row
        set sht=worksheets(range("A"&i))
        sht.range(range("b"&i))=range("c"&i).value 
   next i
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top