Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Apostrophe's apearing in range address
In the following code, RangeNamePrefix = "Jul071" and NewSheet.Name = "July,
2007 - 1" ================================================== = Dim NewRangeName As String Dim RefersTo As String RangeAddress = Replace(Range("DateValues").Address, "$", "") RefersTo = "='" & NewSheet.Name & "'!" & RangeAddress NewRangeName = RangeNamePrefix & "DateValues" ActiveWorkbook.Names.Add Name:=NewRangeName, RefersToR1C1:=RefersTo ================================================== = The variables resolve to the following: RangeAddress: "A20:A450" RefersTo: "='July, 2007 - 1'!A20:A450" NewRangeName: "Jul071DateValues" You would think that after this code runs, the range A20:A450 would be named properly, but it's not. When I go to Insert/Name/Define, the range name is listed corrctly, but the address is wrong. It has apostrophes around the individual cell addresses, like this: ='July, 2007 - 1'!'A20':'A450' I'm stumped. Anyone know what's going on here? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Apostrophe's becoming upside down question marks on the web | Excel Discussion (Misc queries) | |||
How to create a range address with ADDRESS function? | Excel Worksheet Functions | |||
getting the absolute range address from a dynamic named range | Excel Programming | |||
How to convert numbers with apostrophe's (ex. 219'2) to decimals? | Excel Worksheet Functions | |||
To data apearing in other sheets I can use =SUM(. How I can have . | Excel Worksheet Functions |