Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Search/replace returns Formula too long

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hinesgg - 12 Jan 2007 23:58 GMT
I am not a programmer.  I typically create macros and do minor VBA editing to
make things work.  

I've created a macro that searches a column for specific occurrences (",")
and replaces them with a comma and a space.  The problem is that one cell
sometimes contains too many characters.  When that occurs, I get a Formula
too long error and the macro stops running.  

Can you advise on how to correct the code?  (see below)
*******
Cells.Replace What:=",""MEETINGS LIST""", Replacement:="", LookAt:=xlPart _
       , SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
       ReplaceFormat:=False

Signature

Gail Hines
Texas State Auditor''s Office
ghines@sao.state.tx.us
512-936-9760

Don Guillett - 13 Jan 2007 01:14 GMT
Perhaps you should restrict to the column desired. try

columns(3).Replace What:=",MEETINGS LIST", Replacement:="", LookAt:=xlPart _
       , SearchOrder:=xlByRows

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

>I am not a programmer.  I typically create macros and do minor VBA editing
>to
[quoted text clipped - 11 lines]
>        , SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
>        ReplaceFormat:=False
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.