Results 1 to 2 of 2

Creating a Pivot for Excel 2003 with more than 255 characters in a cell

Threaded View

  1. #1
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Creating a Pivot for Excel 2003 with more than 255 characters in a cell

    hi guys. i edited this code i found provided by Andy Pope. the whole code is not going to work because i haven't changed it. but what i'm stuck with is this part where i realised the code is not working when the number of characters in a cell exceeds 255. this is supposed to be for an xls file.

    so i only need help for it to work past this particular last line of code:
    Sub test()
        
              
        Dim rngData As Range
        Dim rngOutput As Range
        Dim strPTName As String
        Dim pvtTable As PivotTable
    
        With Worksheets("Sheet1")
            LastRowTemp = .Cells(Rows.Count, "A").End(xlUp).Row
            Set rngData = .Range("A1:L11") '" & LastRowTemp) '").CurrentRegion
            Set rngOutput = Sheets("Sheet2").Cells(3, 1)
        End With
        strPTName = "PT_TEMPORAL"
        
        With ActiveWorkbook.PivotCaches
            With .Create(SourceType:=xlDatabase, SourceData:=rngData, Version:=xlPivotTableVersion10)
                Set pvtTable = .CreatePivotTable(TableDestination:=rngOutput, TableName:=strPTName, _
                                  DefaultVersion:=xlPivotTableVersion10)
            End With
        End With
    and if you change the part in red to A1:L10, it works. as i have mentioned, it could be because of the text exceeding 255 characters. that's my guess.
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Use cell to update Pivot Table Filters in Excel 2003
    By new_vba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2011, 09:36 AM
  2. Replies: 9
    Last Post: 07-29-2009, 09:12 PM
  3. Excel 2003 - How to trim "0" characters in a cell?
    By Trotamundos in forum Excel General
    Replies: 4
    Last Post: 05-19-2009, 09:56 AM
  4. [SOLVED] Excel 2003 Pivot Table as a source cell -
    By Teresa in forum Excel General
    Replies: 1
    Last Post: 08-02-2006, 04:10 PM
  5. [SOLVED] How to set number of characters within a cell in Excel 2003?
    By aqmdtran in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2006, 12:15 PM

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