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 / December 2007

Tip: Looking for answers? Try searching our database.

Find and Replace

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AD - 10 Dec 2007 03:08 GMT
Hello,

The following text (or variation of it) is always in Cell H7 on a sheet
called "SetUp"
Some parts of this string are static, and others are updated as required.
I want to find and replace the text (which in  this case is "FOODLIFE") with
other text.
The string "PRIMARY_VENDOR|^Method==|^2Val1="  is static, so if I can find
this, then replace whatever is after it, up until the beginning of the next
"|"

^1Enable=Y|^1Field=LOC_ID|^1Method==|^1Val1=41|^1W=V|^2Enable=Y|^2Optr=and|^2Field=PRIMARY_VENDOR|^2Method==|^2Val1=FOODLIFE|^2W=V|^3Enable=Y|^3Optr=and|^3Field=BIN_1|^3Method=Starts|^3Val1=F|^4Enable=-|^4Optr=and|^4Field=DEPARTMENT|^4Method==|^4Val1=FROZEN|^5Enable=-|^5Optr=and|^5Field=QTY_ON_HND|^5Method=<=|^5Val1=0|^6Enable=-|^6Optr=and|^6Field=ITEM_NO|^6Method=Contains|^6Val1=31863|^7Enable=-|^7Field=BRAND|^7Method=Contains|^8Enable=-|^9Enable=-|^10Enable=-|

Any ideas would be appreciated.

Thanks,

Ariel
Stefi - 10 Dec 2007 11:21 GMT
=SUBSTITUTE(H7,LEFT(MID(H7,SEARCH(H8,H7)+LEN(H8),LEN(H7)),SEARCH("|",MID(H7,SEARCH(H8,H7)+LEN(H8),LEN(H7)))-1),H9)
where in my example H8 contains the static part
                              H9 contains the other text

Regards,
Stefi

„AD” ezt írta:

> Hello,
>
[quoted text clipped - 14 lines]
>
> Ariel
 
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.