Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default dynamic range counta error

Try this

ThisWorkbook.Names.Add Name:=namerangex, _
RefersTo:=Offset("'" & nameworksheet & "!$E$6", 0, 0,
Application.CountA("'" & nameworksheet & "!$E$E") - 1, 1), Visible:=True

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
oups.com...
I am trying to make a macro that will create dynamic named ranges
since i have 500 of them to make 25 per worksheet for 24 worksheets.

i want it such that each time we hadd a row or multiple rows to the
worksheet it will update the range.
for somereason when it gets to this line it tells me that there is a
sub not defined when i try to run and it highlights the counta.

i have already tried worksheetfunctions.counta and then it moves and
gives me offset as error and on and on.

wondering if you guys know how to make it work

thanks very much


ThisWorkbook.Names.Add Name:=namerangex, _
RefersTo:=Offset("'" & nameworksheet & "!$E$6", 0, 0,
CountA("'" & nameworksheet & "!$E$E") - 1, 1), Visible:=True



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error referencing linked dynamic range Basil Links and Linking in Excel 3 January 9th 10 01:48 PM
Defind Dynamic named Range up to first error chg Excel Worksheet Functions 3 December 6th 09 09:32 PM
Trapping error with dynamic range ArthurJ Excel Programming 4 August 28th 05 08:44 PM
Dynamic Ranges that do not use COUNTA($A:$A) sebastienm Excel Programming 1 September 3rd 04 08:14 PM
Dynamic Ranges that do not use COUNTA($A:$A) Frank Kabel Excel Programming 0 September 3rd 04 07:08 PM


All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"