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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

SIXTH SENSE

Well-known Member
Joined
Oct 29, 2003
Messages
1,883
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,991
Messages
5,856,683
Members
431,828
Latest member
kARTIK12345

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
Top