+ Reply to Thread
Results 1 to 3 of 3

Type Mismatch on Pivot Table creation

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Type Mismatch on Pivot Table creation

    The macro snippet below is a tried and true one I've been using for months. This morning it started giving me an error 13 Type Mismatch on the line beginning "ActiveWorkbook.PivotCaches.Add...". I thought maybe it was having trouble with the used range, so tried adding "ActiveSheet.UsedRange
    ", but that didn't help. I'd appreciate any insight anyone can provide.
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Type Mismatch on Pivot Table creation

    I found a cause, but I'm not sure why it's a cause.

    In the data source for my pivot, I have a column called "Desc", which orignally contains a 30 character description. This morning I augmented that piece by running a routine that replaces the 30 character description with a paragraph fully describing the item. After that is when I started having the problem.

    What's really weird is that WITH the paragraphs in, I can manually create the PT with no problem, but my automation won't do it. Going back to the 30 character description, the automation creates the pivot with no problem.

    Any clues as to the "Why" of this would be greatly appreciated.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Type Mismatch on Pivot Table creation

    Okay, I found this one out on my own. The problem was Excel 2003's limits, in this case an apparently undocumented one of having over 911 characters in a cell. I truncated the data, and now I'm rocking and rolling.

    Thanks,
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1