+ Reply to Thread
Results 1 to 4 of 4

Find and Replace Help

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    Calcutta
    MS-Off Ver
    Excel 2013
    Posts
    87

    Find and Replace Help

    Hi

    I have a spreadsheet with a column of websites from where I have to remove the ones ending with certain extensions, like .edu, .gov, .us .mil etc. For doing this, I am trying to Find and Replace the text with itself but format it with a color (while replacing) so that I can sort by the color and remove them.

    The problem is when I am replacing .mil with .mil (with a color) it is affecting domains with .mil extension as well as domains like .milano, .milky etc. The same happening with .us, it's selecting domains like .usa-example.com

    How can I do a Find and Replace where only the last dot (.) is taken into consideration while replacing and formatting the text. So when I replace .mil with .mil (colored) it would only match domains ending with .mil extension and not consider www.milano.org ?

    Hope I have been able to explain the situation properly


    Thanks

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Find and Replace Help

    I think there's probably an easier way to do this, using Conditional Formatting. Select your range, then click 'Conditional Formatting' then 'New Rule' then 'Use a formula to determine which cells to format'.
    Enter this in the formula box:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Change A2 to the top cell of your range. Select a fill colour.
    Add any other domain endings you need to - the format you need for each one is:
    RIGHT(A2, number of characters including the dot)="dot plus ending",

    Now you can sort your list by cell colour and remove the unwanted ones.

    Hope that helps.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Find and Replace Help

    I got your PM saying the formula didn't work for all the websites and had a look at the file you provided, but unfortunately you didn't note which endings it doesn't work for. Is the problem with the ones which have a slash as well (.com/ instead of .com) or other ones? I understand that you don't want to give too many details, but if you could just give an indication of which endings aren't working, we can try to fix the formula or give you a better solution.

  4. #4
    Registered User
    Join Date
    04-13-2013
    Location
    Calcutta
    MS-Off Ver
    Excel 2013
    Posts
    87

    Re: Find and Replace Help

    Hi Aardigspook

    Thanks for your reply. I was able to solve this by removing the preceding www. from the domain names. That way a find and replace with .edu or .org only matched the extension of the domains and I was able to sort them accordingly.

    Thanks for your help

+ 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. [SOLVED] Using find replace to first find two double quotes and replace with a single double quote
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2015, 10:13 AM
  2. [SOLVED] Find and replace where contents a formula so can't be seen by Find and replace.
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2015, 02:24 PM
  3. Replies: 16
    Last Post: 12-02-2014, 03:38 PM
  4. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  5. [SOLVED] find and replace to not replace characters found as wildcards
    By sabutler4 in forum Excel General
    Replies: 4
    Last Post: 07-03-2013, 06:48 PM
  6. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM
  7. [SOLVED] find and replace - replace data in rows to separated by commas
    By msdker in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2006, 08:10 PM

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