Problems Creating a New Named Range in VBA

thisisnotluisa

New Member
Joined
Jun 28, 2016
Messages
7
Hello! I'm having issues creating a named range in excel.

Here's my Code in VBA:

Public Sub Range_Very_Large()


ActiveWorkbook.Names.Add Name:="very_large", _
RefersTo:="='UK WWTWs'!$B$334:$B$" & Sheets("Business Model").Range("F40")


End Sub

When I go into a cell on a sheet and put =very_large I keep getting #NAME! and when I go to name manager the name isn't there.
 
creating the two sheets you have indicated and adding 5000 to F40 the code does exactly as expected, typo or missing value ?
 
Upvote 0

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