![]() |
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 |
All times are GMT +1. The time now is 07:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com