Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 90209

=INDEX(PeriodList,MonthNo) creating _xlfn.SINGLE name in workbook

$
0
0

I hope someone will be able to help with a problem that has surfaced with a recent Excel update.

If I define two range names in an Excel worksheet and then enter =Index(PeriodList,MonthNo) in cell A13 via the UI, I find that Thisworkbook.Names.Count in VBA reports 2 - as expected. However, if I execute Activesheet.Range("A13").Formula = "=Index(PeriodList,MonthNo)" in VBA, Thisworkbook.Names.Count reports 3 and I find that a new name that cannot be deleted is created. The name is _xlfn.SINGLE. The existence of this name is a problem for a significant number of widely distributed Excel templates that fail when attempting to delete this name. This only became a problem after a recent Excel update.

The problem seems to be with the MonthNo element in that "=Index(PeriodList,1)" does not generate the _xlfn.SINGLE name.

Can anyone identify how to enter something that is the equivalent of "=Index(PeriodList,MonthNo)" in VBA without creating the unwelcome _xlfn.SINGLE name?


Viewing all articles
Browse latest Browse all 90209

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>