Replace text with formula in calculate columns

How can I replace ";" in a text like this with " AND " ?
example text: "abc;cde;efg;ijk"
the result should be like this: "abc AND cde AND efg AND ijk"

Hi,
According to your description, my understanding is that you want to replace “;” with “AND” in calculated column.
As you are not using English as the default language, you should use the localized version of function names and ";" instead of commas.
To replace all the “;” with “AND”, we need to use the formula as below(for English site):
=REPLACE((REPLACE((REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," AND ")),SEARCH(";",(REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," AND "))),"1",
" AND ")),SEARCH(";",(REPLACE((REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," AND ")),SEARCH(";",(REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," And "))),"1",
" AND "))),"1"," AND ")
More references:
http://sharepoint.stackexchange.com/questions/59195/modifying-a-calculated-column-gives-different-errors
http://social.technet.microsoft.com/Forums/sharepoint/en-US/5487889f-5fc8-48e1-8ea2-28f8c9c8ad0c/calculated-field-error?forum=sharepointgenerallegacy
http://office.microsoft.com/en-in/windows-sharepoint-services-help/replace-function-HA001161055.aspx
Best regards.
Thanks
Victoria Xia
TechNet Community Support

Similar Messages

  • Use Powershell to replace text with image in Word document

    I have a powershell script that uses a Word document as a template to create signatures that I am pushing out to my organization.
    The document is populated with text formatted the way I want the signature to look, that I then do a FindText and ReplaceText on.  This works fine for replacing text with text, but I can't figure out how to properly replace some of the holder text with
    an image and a link.  I found a few posts about adding images to word documents, but none that seem to work properly in this scenario.
    Any insight would be greatly appreciated, thanks!

    Dear BOFH,
    You are correct that method I outlined is not for inserting an image into a signature block (which would be in Outlook, not Word).  The links you post do certainly deal with outlook signatures, well done... Except that the question was about how to
    use a Powershell script to replace text in a Word document with an image.  Sure it was framed in the context of creating signatures, but the poster expressed that they already had a method of generating and replacing text, and just needed to know, as
    I did, how to do the thing they actually asked.
    Please BOFH... Please forgive my audacity in hoping to find a reference (any reference) to how to replace Word text with images via Powershell in a thread titled "Use Powershell to replace text with image in Word document".
    This is certainly a scripting question, and even something as simple as "You will need to call the .NET methods for the Word find/replace functionality.  Please ask in the Word forums for the correct method to use. 
    If you need help on calling .NET methods look HTTP ://here"support you offered combined with the contempt you offer in response to my actual substantive help to the actual question asked.
    BOFH, you are not better than us, just more arrogant.
    Can you please start your own question as this one has been closed.  Please see scripting guidelines.
    We cannot guarantee you satisfaction as this is a user supported forum.  The is no SLA for community support.  Perhaps if you posted a better worded question as a new topic someone might be able to help you resolve your issue.
    The topic you are posting on is closed and answered.
    ¯\_(ツ)_/¯

  • Lion replaces text with 'block A' characters in safari

    about 1/4 of the sites i vist now (including my own--in safari) have a 'block A' character where there is html text.
    does anyone know how to fix this?
    thanks.

    There are two articles on MacFixit about this.
    Fonts are implicated in both.
    http://reviews.cnet.com/8301-13727_7-20087102-263/webkit-sandboxing-conflict-cau ses-safari-block-a-font-problem/
    http://reviews.cnet.com/8301-13727_7-20085570-263/safari-in-os-x-lion-replacing- text-with-block-a-characters/
    Clearing caches and booting to Safe Mode has helped the majority of people experiencing this problem; however, for a few people the problem returns after a while, indicating that either Safari itself or the system's font configuration may be actively corrupting the font cache.
    .... (example)
    - If this happens, then unfortunately the approach would be to systematically disable system fonts using Font Book until the problem goes away, and then remove the specific fonts that are contributing to the problem.

  • Applescript   replace text with clipboard

    Sorry if this has been asked before, I have been searching for hours and cannot find anything.
    what I would like to do is copy text from a safari webpage , swap to the textedit program and replace text with the copied contents.
    for eg.
    from safari I have copied the user link, I then want it to swap over to textedit, find the keyword "userlink" and replace it with the copied content from safari
    userlink
    email
    number
    HHopefully I have explained it correctly, and thanks in advance for any help

    Hi,
    Like this:
    set x to the clipboard as «class RTF »
    tell application "TextEdit"
        set first word of front document whose it = "userlink" to x
    end tell
    If you want plain text, remove as
    as «class RTF »

  • Search .docx and replace text with image

    I've got a directory containing a series of images. The images will always be the same name and I need to insert them into placeholders in a Word document which will be a template. I thought of using the image names as placeholders, opening the document
    and searching for the image name, replacing it by inserting the image, and doing so for each image in the directory.
    $file is the name of the image in the directory and it loops through them okay.
    foreach($file in Get-ChildItem $savepath -Filter *.jpg)
            # search word doc and replace selected text with image ($file)    
    Also inserting the image seems simple enough from a TechNet article I found, but I've got no idea how to open the Word document and do a search and replace. I found a few articles related to the subject but I couldn't get them to work when I tried to adapt
    them.
    Any help is appreciated. Thanks in advance.

    This 'might' be possible, but I'm having a hard time finding good references to the com object capabilities for inserting an image into a word document.  Creating new, converting format, that sort of thing is straightforward.
    I'd do a search on "powershell word comobject" and variations of insert image update edit, etc.  Or maybe someone else with more experience/knowledge has a magic bullet for you.  Once you get some info on doing it with powershell, expand
    your search by omitting the powershell keyword, there's gotta be some solid documentation for the comobject somwhere, but it will probably be a bit complex.
    You can also:
    $word = new-object -comobject word.application
    $doc = $word.documents.add("<path to word document>"
    and get-member to your heart's content, but finding references and/or documentation might be easier.  
    Good luck!
    Edit:  This could help, but really doesn't give much insight into placement of the image, only helps getting the image into the doc:  http://gallery.technet.microsoft.com/office/44ffc6c8-131f-42f1-b24b-ff92230b2e0a
    If you do find something useful, post it here, I'm sure others could benefit!
    SubEdit:  Should have thought of this already...
    http://msdn.microsoft.com/en-us/library/ff837519(v=office.14).aspx

  • Substitute Function in Excel: Replace text with instance number in BO

    Hi,
    I have a column where data is merged from three other columns each text separated by "-". Ex: Services - Phoneline - New Customer.
    What I wanted to do is to just get the last text which is "New Customer" separated. I used "Length(<columnValue>)-Length(Replace(<columnValue),"-",""))" to get the number of instances of "-" in the text as it varies from 1 to 3.
    I use to do it in excel using substitute function where I have the facillity to use the character instance number. I don't know how to do this in Business objects.
    Please help...
    Thanks

    DDann wrote:
    =SUMIF('New Req to Capability Mapping'!$D$2:$D$148,A2,'New Req to Capability Mapping'!$I$2:$I$148)
    Col A is a list of the capabilities and the formulas are in COL B of this sheet.  [....] The problem that I am experiencing is that for some of the capabilities I am see correct count totals for some while others are not for instance, "Account
    Management" shows correct while "Security Awareness Program" is not. I have copied the text for each of the capabilities from the main sheet into Col A to reduce keystroke errors. I have also copied those strings into some of the problematic
    formulas instead of using the cell address to see if the results change.
    Good troubleshooting techniques.  Unless someone gets lucky with a wild guess, I suspect we cannot help without having the workbook to see the situation for ourselves.
    You can upload an example Excel file (devoid of any private data) that demonstrates the problem to a file-sharing website.
    Then post the "shared", "public" or "view-only" link (aka URL; http://...) in a response here.
    The following is a list of some free file-sharing websites; or use your own.
    Box.Net: http://www.box.net/files
    Windows Live Skydrive: http://skydrive.live.com
    MediaFire: http://www.mediafire.com
    FileFactory: http://www.filefactory.com
    FileSavr: http://www.filesavr.com
    RapidShare: http://www.rapidshare.com
    I suspect that the problem has to do with either a mismatch in spacing or the presence of non-breaking spaces (HTML &nbsp) or other non-printing characters, notwithstanding your efforts to eliminate that possibility with your copy-and-paste experiments.

  • Replace text with number

    Hi
    i have 2 columns from flat file
    0amount       number
    10000          
    "Intangibles"         2000
    20000              
    'sales'         4000
    my output is required like
    incase if i am getting text ( this text is not constant its coming like any thing shownw above example)  i need replace number key figure values in 0amount fileds.
    how can i reach with this in field routine
    data v_text type char
    if source_fields_0amount not equall number
    result 0 number ( kf)
    like what is code i need to use

    Hi,
    One thing's to be clarified :
    If you need sometimes number & sometimes text in a particular target field, then it has to be a char field and you cant do any mathematical operation on that later.
    --Akashdeep

  • Replace text with image using Applescript in InDesign CS5

    Hi to everyone, i'm looking for some suggestions to resolve my problem.
    I've to replace some strings with jpeg images stored on my pc
    Here is the code to replace two strings with the new ones.
    tell application "Adobe InDesign CS5"
              set myDocument to active document
              set myPage to page 1 of myDocument
              set stringsToReplace to {"111", "222"}
      repeat with iterator from 1 to (count stringsToReplace)
           set find text preferences to nothing
           set change text preferences to nothing
           set myFoundItems to nothing
           set element to item iterator of stringsToReplace
          if element is "111" then
               set find what of find text preferences to "111"
               set change to of change text preferences to "ONE"
               set myFoundItems to change text
               display dialog ("Found : " & (count myFoundItems) & " occurences of " & element)
          else if element is "222" then
               set find what of find text preferences to "222"
               set change to of change text preferences to "TWO"
               set myFoundItems to change text
               display dialog ("Found : " & (count myFoundItems) & " occurences of " & element)
          end if
              end repeat
      set find text preferences to nothing
      set change text preferences to nothing
    end tell
    Can you hel me?
    Thanks in advance.

    Hello, I have a couple of questions for you… How come you have strings in text frames… Would you not be better off using labels for this…? ( thats how I would do this ). Off the top of my head I think you will need to remove any text content from the frame to be able to change it's content type… only then will you be able to place a graphic… How are you associating your strings with the required image files… Do you have this in some extenal file Excel or FMP.

  • How to replace text with vector image in 3d space

    Hello,
    I want to replace the text in this template http://vimeo.com/15026094 with a vector image logo.
    Any ideas would be helpful. Btw, I have CS4.
    Thanks,
    td

    I finally took a look at your Vimeo example and I'd guess that the animation of the text was created with Text Animators and range selectors. As Mylenium said, and as I said
    Reveal all of the animated properties that you want to transfer to your new layer. Usually pressing the U key will suffice.
    Note: Text animations and shape animators will be ignored unless the new layer is a text or shape layer.
    You need read up on Text Animators so you can understand them.
    Type a question in the search field at the top right corner of After Effects.
    And you'll find all of these resources. (providing you have the Adobe Help preferences set to search the web)
    Animation presets will save all animated properties applied to a layer, but they will only apply the keyframes to properties that exist on the layer. Text Animators only exist in text layers so you'll have to animate your logo by hand or grab yourself a font creation tool and recreate your logo as a font.

  • Replace text with images

    Hi,
    I'm using a script found here, to replace @equ001.pdf@ with the corresponding image, same for eq002 etc.
    This script works more or less ok for me.
    Sometimes, it removes some image names without replacing the image, sometimes it was leaving some "@" here and there.
    Sometimes, it's giving me an error on the "place image" code, saying it cannot find the image, giving it's path ending with the grep expression $2 and doesn't work at all.
    Sometimes it does part of the job, stops, gives the same error as above, and continues to work when I click ok.
    Today, it didn't worked on a document. I copied the text to work on into a new InDesign document an there, it worked (but in two times).
    Is there any other way of doing this ?
    if(app.documents.length != 0){
        var myFolder = Folder.selectDialog ('Choose a folder with images');
        if(myFolder != null){
            // reset the Find/Change dialog
            app.findGrepPreferences = app.changeGrepPreferences = null;
            // formulate a grep search string
            app.findGrepPreferences.findWhat = '@.+?@';
            // find all occurrence, last one first
            f = app.activeDocument.findGrep (true);
            for (i = 0; i < f.length; i++){
                // construct file name
                name = f[i].contents.replace (/@/g, '');
                // place the image
                var placedObjects = f[i].insertionPoints[0].place (File (myFolder.fsName + '/' + name));
        // delete all @??@ codes
        app.activeDocument.changeGrep();
    else{
       alert('Please open a document and try again.');

    You should process the found instances back to front:
    for (i = f.length-1; i >= 0; i--)
    Peter

  • Dynamic Calc Member with Formula to Calculate a Rolling 13 Year

    I have to create a rollup in my time dimension that will have 13 members representing each month of a 13 rolling forecast. I am having trouble setting this up as dynamic calc members with a formula assigned to it. For example, on of the members has the following formula.
    As you can see, I am referencing several substitution variables since I want to make this as most dynamic as possible without having to make any changes to the formula member. Only making changes to the substitution variable. Any help would be much appreciated.
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Jan"));
    "RTM 6" = @MDSHIFT(&Act_RF_Last_Month, -1, "Years", , 5, "Period",);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Feb"));
    "RTM 6" = @MDSHIFT(&Act_RF_Last_Month, -1, "Years", , 5, "Period",);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Mar"));
    "RTM 6" = @MDSHIFT(&Act_RF_Last_Month, -1, "Years", , 5, "Period",);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Apr"));
    "RTM 6" = @MDSHIFT(&Act_RF_Last_Month, -1, "Years", , 5, "Period",);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "May"));
    "RTM 6" = @MDSHIFT(&Act_RF_Last_Month, -1, "Years", , 5, "Period",);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Jun"));
    "RTM 6" = @MDSHIFT(&Act_RF_Last_Month, -1, "Years", , 5, "Period",);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Jul"));
    "RTM 6" = @MDSHIFT(&Act_RF_Last_Month, -1, "Years", , 5, "Period",);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Aug"));
    "RTM 6" = @SHIFT(&Act_RF_Last_Month,-7);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Sep"));
    "RTM 6" = @SHIFT(&Act_RF_Last_Month,-7);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Oct"));
    "RTM 6" = @SHIFT(&Act_RF_Last_Month,-7);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Nov"));
    "RTM 6" = @SHIFT(&Act_RF_Last_Month,-7);
    ELSE #Missing;
    ENDIF
    IF((@ISMBR(&Current_Year)) AND (&Act_RF_Last_Month == "Dec"));
    "RTM 6" = @SHIFT(&Act_RF_Last_Month,-7);
    ELSE #Missing;
    ENDIF

    We use similar logic but its in a calc script, not a dynamic formula.
    Here's an example of what we do:
    FIX (&Year, &Scenario)
    IF (@ISMBR("JAN"))
    "Average Usage%" = @AVG(SKIPBOTH, @MDSHIFT("Usage %"->"DEC"->&actYear, -1, "Year",), "Util %"->"JAN"->&actYear);
    ELSEIF
    ENDFIX
    Another example in a different database:
    IF (@ISMBR("JAN")) ((@MDSHIFT("Fees"->APR,-1,YEARS,)+@MDSHIFT("Fees"->MAY,-1,YEARS,)+@MDSHIFT("Fees"->JUN,-1,YEARS,)+@MDSHIFT("Fees"->JUL,-1,YEARS,)+@MDSHIFT("Fees"->AUG,-1,YEARS,)+@MDSHIFT("Fees"->SEP,-1,YEARS,)+@MDSHIFT("Fees"->OCT,-1,YEARS,)+@MDSHIFT("Fees"->NOV,-1,YEARS,)+@MDSHIFT("Fees"->DEC,-1,YEARS,)+"Fees"->JAN)/10)*12;

  • Replace text with data while viewing

    Hello,
    I have data in table like below
    id name
    1 tanveer
    2 ali khan
    3 tasir
    I want to write a query that display result on my abbreviated vales e.g. tanveer =tan,ali khan=al.
    so my query result will be
    id name
    1 tan
    2 al
    regards,
    tanveer

    Use "SUBSTR(name, 1,3)" to display the first 3 characters. However, if your "rule" for abbreviations is more complex (for example "ali khan" becomes "al" instead of "ali" ???) then you'd have to use either of these methods :
    1. Store the abbreviated values in another column in the table
    2. Use a lookup table to "map" names to abbreviations
    3. Write a PLSQL function with the "rules" built into it and taking the current name as an input, returning an abbreviated name
    4. Use a simple DECODE function (which can be used only when you have a very small number of distinct "name" values to hardcode into the function call).
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Replace Text with Formatting

    I need to replace every instance of the word Forward! with Forward! in italics. I have not found a way to do that...Any Ideas?
    Thanks
    JackL
    Captivate 7 - Windows 7

    I am using CP 7 and Word 2010 and some really strange fonts including Neurpol, etc. Anyway it worked perfectly for five of my six modules (projects). For one however, the import affected no change so I cleared my preferences (a trick Iearned from youi), and the import worked perfectly.
    Altogether I had approximately 800 replacements. Doing it manually would have been a nightmare! Especially given that Captivate does not highlight the word when found (at least in my version-instance of CP 7).
    Thanks for replying!
    JackL

  • Replace text with wildcard in the middle

    I am looking to change several config file keys that have server names in the format 
    <server>server01</server>
    <server>server02</server>
    <server>server03</server>
    I would like to change all of the server tags to contain the same server, for example
    <server>server04</server>
    Is there any way I can use wildcards to replace all of server 01, 02, 03 etc with server04? Thanks!

    Let me clarify the format, I basically want to to replace anything in the server tag with a consistent replacement. The actual server names will vary and do not follow a format of Server##
    For instance I'd like to change
    <server>qwerty001</server>
    <server>s1234567</server>
    and
    <server>11111111</server>
    all with
    <server>newservr</server>
    I wanted to use the actual tags to match as the server names will not follow a standard and I'd only like one replace statement to change them all.  I tried a couple variations of what you posted but haven't had any luck getting it to work.

  • Regular expressions for replacing text with sms language text

    Hi, I'm trying to write a function which converts normal, correctly spelled text into the shorter sms language format but struggling to come up with the regular expressions i need to do so, can anyone help?
    1: remove surplus white space at the beginning of a sentence and at the end of a sentence.
    e.g. " hello." --> "hello." OR "hello ." --> "hello."
    2: remove preceeding and/or proceeding space if there's a word then a number possibly followed by another word
    e.g. "come 2 me" --> "come2me" OR "dnt 4get" --> "dnt4get"
    3: remove "aeiou" if word starts and ends with "!aeiou"
    e.g. "text" --> "txt"

    You can make the whitespace on either side optional:   text = text.replaceAll("\\s*(\\d)\\s*", "$1");1. Use String's trim() method.
    3. This one has to be done in two steps: import java.util.regex.*;
    public class Test
      public static void main(String... args) throws Exception
        String text = "The quick brown fox jumps over the lazy dog.";
        System.out.println(devowelize(text));
      public static String devowelize(String str)
        Pattern p = Pattern.compile(
          "[a-z&&[^aeiou]]++(?:[aeiou]++[a-z&&[^aeiou]]++)+",
          Pattern.CASE_INSENSITIVE);
        Matcher m = p.matcher(str);
        StringBuffer sb = new StringBuffer();
        while (m.find())
          m.appendReplacement(sb, m.group().replaceAll("[aeiou]+", ""));
        m.appendTail(sb);
        return sb.toString();
    }

Maybe you are looking for

  • Display XML in DWMX2004 page

    I've been able to create a valid XML doc. I wanted to display the data inside a DWMX2004 templated page. Tried the standard things on WC3 and other XML books and resources and did not have any luck. (Most of it is over my head, parsers, js and the li

  • Home Page - Dumb Question

    Is there a "home" icon somewhere that I am missing? Is the only way to return to your home page on Safari other than the keyboard strokes? In the help menu, it says to click home button on toolbar, but I can't seem to locate the button. Thanks

  • Java 3D installation problems

    I have installed Java 1.4.1 and am now trying to install Java 3D. When i try to run the demos from the Java3D folder i get an error: "No compatible device found, please switch to other display mode and try again". How do i solve this problem, so that

  • Receive location disabling(File Adapter)

    Receive location is automatically disabling . Note: In the rcv loc. I am giving proper authentication details of user(who has full control on "Folder" Errors:" The Messaging Engine failed to add a receive location "Receive Location1" with URL "\\Serv

  • Enumeration in SOAP message

    Is there any way that I can specify an enumeration in the XML return from my webservices in Workshop.