+ Reply to Thread
Results 1 to 8 of 8

How to add ";" at the end of every sentence?

  1. #1
    Registered User
    Join Date
    03-15-2015
    Location
    Espaņa
    MS-Off Ver
    2013
    Posts
    80

    How to add ";" at the end of every sentence?

    Hi there,

    I have a format like this:

    KW - Some-text with
    Maybe
    Multiple words
    LA - English
    ...etc...
    KW - Some text
    With Maybe
    Words
    LA - Spanish
    ...etc...
    KW - Text with
    Maybe Multiple
    words
    LA - English
    ...etc...
    KW - Some
    Text
    With
    Maybe
    Multiple
    words
    LA - Portuguese
    ...etc...
    As you can see the KW - is followed by certain sentences, the first one is right after the KW - and the one per line, they end when LA - begins

    I need to add a ; semi-colon at the end of each sentence under KW - how could I achieve this?
    In the ...etc... are many other data that should be untouched.

    Like this:
    KW - Text with;
    Maybe Multiple;
    words;
    LA - English
    ...etc...
    KW - Some;
    Text;
    With;
    Maybe;
    Multiple;
    words;
    LA - Portuguese
    ...etc...

    Thank you very much for your time,
    Regards.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: How to add ";" at the end of every sentence?

    how can someone tell what "constitutes" a sentence? Is phrase as shown in your post a single row?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: How to add ";" at the end of every sentence?

    since you haven't answered, I'll make an assumption and give you this simple answer.
    if each of these…
    KW - Some-text with
    Maybe
    Multiple words
    LA - English
    is represented by a row, then use this in the cell next to it…
    =right(A1,99)&";"
    assuming your data begins in column A cell 1.

  4. #4
    Registered User
    Join Date
    03-15-2015
    Location
    Espaņa
    MS-Off Ver
    2013
    Posts
    80

    Re: How to add ";" at the end of every sentence?

    Sorry for the delay. Indeed it is one per row!

    Thank you very much!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to add ";" at the end of every sentence?

    How about just...
    =A1&";"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: How to add ";" at the end of every sentence?

    Ford, much better and shorter. duh - why didn't I think of that one?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to add ";" at the end of every sentence?

    haha been there, done that

  8. #8
    Registered User
    Join Date
    03-15-2015
    Location
    Espaņa
    MS-Off Ver
    2013
    Posts
    80

    Re: How to add ";" at the end of every sentence?

    Hi there!,

    Sorry to revive this thread but, how can I achieve this but only for records in KW?

    Imagine the result list goes like this:

    ...
    ...
    ..
    TY - JOUR
    AN - WOS:000207966700012
    DA - Jul-Sep
    J2 - Acta Bioquim. Clin. Latinoam.

    KW - CARDIAC TROPONIN-I;
    ACUTE MYOCARDIAL-INFARCTION;
    BRAIN NATRIURETIC;
    PEPTIDE;
    ARTERY-BYPASS-SURGERY;
    ST-SEGMENT-ELEVATION;
    CREATINE-KINASE-MB;
    DEPARTMENT PATIENT SATISFACTION;
    ACUTE;
    PULMONARY-EMBOLISM;
    CRITICALLY-ILL PATIENTS;
    STAGE RENAL-DISEASE

    LA - Spanish
    M1 - 3
    M3 - Article
    N1 - ISI Document Delivery No.: V17WG
    Times Cited: 0
    Cited Reference Count: 218
    Cited References:

    ....
    ...
    ...
    ..
    Adding a ";" at the end of them, just them, excepting the very last one (as you can see its STAGE RENAL-DISEASE in this case)... I'd certainly need an automatic way since there are more than a million records :'(

    The list I have doesn't have them with the ";" at the end... That's what I need, but exclusively for those within category KW excepting the last one of such category

    It's always from KW to LA, expecting/skipping the last KW item...
    Last edited by elbrujo; 05-29-2015 at 04:35 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 03-15-2015, 12:57 PM
  2. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  3. [SOLVED] Removing ".", "?" or "!" from last word of sentence and replacing it later in vba.
    By staggers47 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-16-2013, 07:20 AM
  4. Replies: 1
    Last Post: 01-05-2013, 03:31 PM
  5. Adding Commas into an "Equation Sentence"
    By sighlent1 in forum Excel General
    Replies: 3
    Last Post: 05-17-2011, 04:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1