Truncated Text

Jenj3

New Member
Joined
Feb 18, 2003
Messages
11
Good morning

I have an excel spreadsheet (MS Office 2000) that is to be completed by salespeople. The spreadsheet contains a text field that salespeople insert any comments they feel relevant. Unfortunately, sometimes the salesperson inserts lengthy comments (1500+ characters).

There is a macro on the spreadsheet the sales rep uses to copy the existing spreadsheet to a new spreadsheet. Unfortunately, the text field gets truncated.

Is there any workaround or anyway I can use a macro to copy the entire "lengthy comments" to a new spreadsheet?

Thanks,
Jennifer
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi Jennifer,

Yes, in Excel 2000, when you copy a worksheet all cell contents are truncated to 255 characters (i.e., only the first 255 characters are copied). However, if you copy the worksheet CELLS instead of the worksheet, the entire contents of the cells are copied. So you will just need to change your macro to create a new empty worksheet, then copy the cells of interest to the new sheet. I believe code like this will do it:

Dim OldWS As Worksheet
Dim NewWS As Worksheet
Set OldWS = ActiveSheet 'or a specific sheet, like Worksheets("Sheet1")
Set NewWS = Worksheets.Add
OldWS.UsedRange.Copy Destination:=NewWS.[A1]
 
Upvote 0
You could add this to your copy code:

Sub Fit()
With Selection
.WrapText = True
.ShrinkToFit = False
.MergeCells = False
End With
End Sub

And/or designate column width to maximum

Selection.ColumnWidth = 255
 
Upvote 0
Damon

Thank you for responding to my post. I am not very good at writing codes, but I was able figure out enough and insert yours into a macro. It worked. It didn't truncate the text, but it saved the worksheet in the same workbook - I need it to save to a new workbook. Also, the formatting and column widths didn't copy over to the 2nd worksheet.

I appreciate any further help you can give me!

Jennifer
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,825
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top