+ Reply to Thread
Results 1 to 6 of 6

Remove prepositions in text using named range list

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    London
    MS-Off Ver
    Excel 2008 Mac
    Posts
    8

    Remove prepositions in text using named range list

    have created a sheet to paste in text and output lower, UPPER, and Proper text I have a named range of prepositions and articles capitalizerd.

    I am trying to use the SUBSTITUTE formula to replace all the occurrences or words that appear in the prepositions list

    so instead of

    Our Breakfast Is Consistent

    We get

    Our Breakfast is Consistent

    so far I have this formula, but it does not work

    =SUBSTITUTE(D6, TRIM(prepositions), TRIM(LOWER(prepositions))

    *ignore the TRIM, Later I added spaces around the named range words, so that BUT STOPPING did not become "But StoPPING to"

    I want to use proper + substitute prepositions and articles to lower text.
    The reason for all this is that we have to often flow in lots of text from a csv into Adobe InDesign. Tickets and Menus.
    Sometimes a client will send TEXT IN ONE FORMAT and then In Camel Case in another for the same brand and release.
    Consistency is key and Excel often helps us achieve this much quicker. I could do this in PHP pre_replace but I am trying to do this in Excel and pass round the office.

    Seems to me I might need some kind of split word and Vlookup combination? Not necessarily and INDEX/MATCH.

    Can anyone help. Would be very appreciated. Any advice would be gratefully received.text_replacement.xlsx

    Thanks

    Andi

    Please see attached sheet
    Last edited by Northstjarna; 05-09-2013 at 07:42 AM. Reason: To add an attachment?

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,289

    Re: Remove prepositions in text using named range list

    Please Login or Register  to view this content.
    Is this what you want?
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Registered User
    Join Date
    10-08-2012
    Location
    London
    MS-Off Ver
    Excel 2008 Mac
    Posts
    8

    Re: Remove prepositions in text using named range list

    hi There,

    No sorry, great for Capatalising the first letter. (Did you see the attachment?)
    I want to make all the prepositions lowercase, articles etc
    Nouns, Adverbs and Adjectives (everything else) Capatailised.

    IE
    EVERY GOOD BOY DESERVES TO HAVE SOME FUN AT THE PARK - all upper
    Every Good Boy Deserves To Have Some Fun At The Park - Proper (title case)
    Every Good Boy Deserves to Have Some Fun at the Park - This is what I am after.

    Thanks

    Andi

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Remove prepositions in text using named range list

    You can't use OLD TEXT and NEW TEXT arguments of SUBSTITUTE to MULTIPLE CONDITIONS or CELL REFERENCES.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    10-08-2012
    Location
    London
    MS-Off Ver
    Excel 2008 Mac
    Posts
    8

    Re: Remove prepositions in text using named range list

    hi there,

    Yes I know. I was thinking of using the named range as some kind of Array.
    Split the string input into separate words into another array like PHP expload and compare each word to the named range list

    thanks

    Andi

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Remove prepositions in text using named range list

    Looking for that attachment.... Try again?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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