![]() |
Range Name question
I have a range name that's called "PlanMonth1" and I'd like to reference it
within my code. What I want to do is something like this: Debug.Print "Range Value = ", Range("PlanMonth" & ActiveCell.Offset(0, -1).Value).Value but I'm getting an error. What am I doing wrong? Thanks Method Range of object worksheet failed. |
Range Name question
If you have additional named ranges like
PlanMonth1 and activecell.offset(0,-1) contains 1, and PlanMonth1 refers to a single cell, then that should work. -- Regards, Tom Ogilvy "Barb Reinhardt" wrote: I have a range name that's called "PlanMonth1" and I'd like to reference it within my code. What I want to do is something like this: Debug.Print "Range Value = ", Range("PlanMonth" & ActiveCell.Offset(0, -1).Value).Value but I'm getting an error. What am I doing wrong? Thanks Method Range of object worksheet failed. |
Range Name question
Providing the cell left of the activecell contains '1' and you have a named
range "PlanMonth1" your code should work. That is assuming the named range is only one cell, otherwise it would return an array of values. Trust the responses from Jim Thomlinson and I to your post yesterday answered your question. Regards, Peter T "Barb Reinhardt" wrote in message ... I have a range name that's called "PlanMonth1" and I'd like to reference it within my code. What I want to do is something like this: Debug.Print "Range Value = ", Range("PlanMonth" & ActiveCell.Offset(0, -1).Value).Value but I'm getting an error. What am I doing wrong? Thanks Method Range of object worksheet failed. |
All times are GMT +1. The time now is 12:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com