Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating a dynamic range name using vba
Hi All,
I use dynamic ranges alot, but for the first time i am trying to create a named range in a workbook using vba (dynamic for columns and rows based on Column A and Row 1). the very basic procedure is as follows: - Sub TimTabMaker() ActiveWorkbook.Names.Add Name:="timtab", RefersTo:="=OFFSET(Calendar!$A$1,0,0,COUNTA(Calend ar!$A:$A),COUNTA(Calendar!$1:$1)" End Sub but when i run it i get a '1004' run-time error, indicating there is a problem with the formula. I'm guessing there is a very simple reason for this, but i cannot see it. can you help?! any help is (as always) appreciated. cheers guys, Tim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating a dynamic range name using vba
sorry... i've just realised, i missed the end bracket... DOH!!
"Tim Marsh" <tmarsh-trousers-@-take off my trousers to reply-blueyonder.co.uk wrote in message ... Hi All, I use dynamic ranges alot, but for the first time i am trying to create a named range in a workbook using vba (dynamic for columns and rows based on Column A and Row 1). the very basic procedure is as follows: - Sub TimTabMaker() ActiveWorkbook.Names.Add Name:="timtab", RefersTo:="=OFFSET(Calendar!$A$1,0,0,COUNTA(Calend ar!$A:$A),COUNTA(Calendar!$1:$1)" End Sub but when i run it i get a '1004' run-time error, indicating there is a problem with the formula. I'm guessing there is a very simple reason for this, but i cannot see it. can you help?! any help is (as always) appreciated. cheers guys, Tim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a dynamic range always using the last 10 rows of data | Excel Worksheet Functions | |||
creating a dynamic graph | Excel Programming | |||
Creating a Dynamic Named Range Using Sheet Name and Column Header | Excel Programming | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
select dynamic range with dynamic start point | Excel Programming |