Excel Pivot Tables truncate cells to 255 characters when you double-click to show detail. I need VBA code to retrieve the complete cell value from the original detail tab:
My Code:Code:Sub fetch_Comments() Dim rngCurrent As Range Dim rngCell As Range Dim rowct As Integer Sheets("Research").Select Range("q9").Select Set rngCurrent = Research.Range("q9").CurrentRegion 'here I get an Error Message;"object required"; in the watch window Current Region does not populate a value rowct = CurrentRegion.Rows.Count rngCurrent = Sheets("Research").Range("q9:q rowCt") rngCurrent.Select For Each rngCell In rngCurrent If Len(rngCell) > 255 Then rngCell = Sheets("Details with Comments").Range("q rowCt") End If Next rngCell End Sub


Reply With Quote




Bookmarks