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.

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 »

  • SQL Replace function: errors if replacement text is 8191 characters

    Oracle 10.2.0.3.0 Enterprise Edition
    I'm working on an application which has a function to generate emails.
    We have a template, which gets filled with data from the database depending on the email being sent.
    To do this I'm using the Replace function to replace certain parts of the template with the right data.
    It seems that if the replacement text (the third argument to the function) is longer than 8191 bytes the function throws a PL/SQL: numeric or value error.
    This limitation doesn't appear to be documented anywhere, certainly nowhere that I can find.
    Anyone know of a way around this short of building my own replace function?

    I've figured out what was going on.
    The database column for the replacement text is defined as a clob, but there is a front end limit of 10,000 characters for the field being used.
    When using the replace function I was assigning the value to a varchar2(32767) field in the PL/SQL.
    So in terms of datatypes the function call is:
    varchar2 := replace(varchar2, varchar2, clob)
    If the length of the clob is over 8191 characters it errors.
    (Presumably because of the bug mentioned in this thread DBMS_LOB.SUBSTR() returning 8191 characters instead of 32767
    I've fixed it by simply changing the datatype of the variable to which the value is being assigned to a clob.

  • 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

  • Can't send but can receive text with certain number but can send/receive to others

    After a year of texting with an out of network (T mobile) number, yesterday my phone became unable to send text to it.  It receives no problem, sends and receives to other numbers and the t mobile number is sending and receiving other numbers without issue.  I get an error message with the X envelope icon.  I've rebooted and had the old conversation deleted from the t mobile number.  I have no idea how to troubleshoot further

    Success!  I tried *228 but no improvement.  Took the phone to Verizon and they blamed Facebook, which I think is close to the truth.  Verizon doesn't support texting to 11 digit phone numbers, so if your contacts are synched to something that uses that format, it might change the way the phone sees the contacts phone number when it tries to SMS the contact.  Lose the leading 1 and you should be OK.

  • 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

  • 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.

  • 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

  • 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 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 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();
    }

  • Extract function for xmltype replaces ~ (tilde) with ']]]'

    Hi,
    In 10.2.0.4 when extracting fragment using xpath and extract function is replacing ~ with ]]]. strange thing is, it happens with only one ~ though there are many ~ in the xml.
    Has anyone faced similar issue with extract() function ?
    Thanks,
    vivek

    This turned out to be a bug. It was resolved through a patch developed.

Maybe you are looking for