ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Named ranges (https://www.excelbanter.com/excel-programming/378718-named-ranges.html)

Barb Reinhardt

Named ranges
 
I want to set up a generic names range based upon the entry in a cell on the
worksheet.

I have the following:

For r = 1 To nms.Count
If nms(r).Name Like aWSName And nms(r).Name Like
"*Actual_Total*" Then
Worksheets(aWS).Names.Add Name:="GenericActual",
RefersTo:=nms(r).name
End If
Next r

When I do it this way, I get a type mismatch.

Any suggestions?

Thanks,
Barb Reinhardt

BTW, I'm having difficulty reading any postings on the Microsoft site
directly using IE 6.0. I had to post this using Outlook Express.



Barb Reinhardt

Named ranges
 
Correction: I have this statement to define the range

Worksheets(aWS).Names.Add Name:="GenericActual", RefersTo:=nms(r)
and nms(r) is
=OFFSET(Sheet1!Date,2,0)

"Barb Reinhardt" wrote in message
...
I want to set up a generic names range based upon the entry in a cell on
the worksheet.

I have the following:

For r = 1 To nms.Count
If nms(r).Name Like aWSName And nms(r).Name Like
"*Actual_Total*" Then
Worksheets(aWS).Names.Add Name:="GenericActual",
RefersTo:=nms(r).name
End If
Next r

When I do it this way, I get a type mismatch.

Any suggestions?

Thanks,
Barb Reinhardt

BTW, I'm having difficulty reading any postings on the Microsoft site
directly using IE 6.0. I had to post this using Outlook Express.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com