Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel macro gives error msg "formula is too long."

Status
Not open for further replies.
Aug 18, 2003
111
GB
Sub test1()
Worksheets("sheet1").Columns("AD").Replace _
What:=Chr(13) + Chr(10), Replacement:=" "
End Sub

This is my very simple macro designed to remove carrige return things from cells. By spreadsheet contains 16800 records with a full description which has carrige returns in it. The macro works on 10200 records then i get an error msg firmula is too long. I've read that this might be because the string in the cell contains more than 305 characters.

Does anyone know how to get around this anoying problem? As i want to add the file to my mysql database soon.
 
So how do i get my macro to work if the cell contains more than 1024 characters which it does by the way.

Thanks anyway.
 
Quote "peterb1985
So how do i get my macro to work if the cell contains more than 1024 characters which it does by the way."

AFAIK you can't - one of the limitations of xl unfortunately


Chris ;-)

Visit for great xl and xl/VBA help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top