On Oct 10, 6:02 am, Cory Kates <
coryka...@gmail.com> wrote:
> I want to start by saying the code I have is working most of the time and I
> have to say, this package has been a total godsend, after using it the idea
> that I might someday have to work in VBA again makes my eyes bleed. That
> said, the problem I'm encountering is as follows. I'm reading through a
> sizable text file (over a thousand printed pages) and parsing out a months
> worth of transaction data for representatives. These representatives have
> four digit IDs which can be numbers or letters. I use these IDs for the
> sheet names. After writing the individual reps data I have a summary
> sheet, the first sheet of the workbook, where I sum categories of values
> (for example mutual funds shares, government bonds etc) across all the reps
> sheets. So 90% of the time I'm golden but, when the reps ID is all numeric
> and that number is higher than the number of sheets in the workbook I get
> the following error traceback. My understanding is that its interpreting
> the number as an sheet index reference (below the first rep ID is 0216). I
> think the problem is actually in how I'm using the formula function. So
> long story short, how do I convince the formula function that 0216 is not
> an index reference but a named reference.
Sheet names like 1234 and The First Sheet need to be "quoted" with
apostrophes '1234' and 'The First Sheet' so that they are interpreted
as a single string token.