+ Reply to Thread
Results 1 to 5 of 5

Search and replace

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Search and replace

    I have a VERY long set of data that I continue to add more to everyday (we can talk about why this should be in a database later).

    I copy and paste the new data to the end of my growing file (sometimes the new data is 1 or 2 lines, sometimes it might be 100)

    As you can see in my attached email: there are ONLY 5 possibilities that can be shone in E14-E23 (and so on) they are A1-A5. If for any reason the result in E is NOT one of the 5 in A1-A5, it should be changed to be whatever C1 is.

    No idea at all of how to build a macro to do this. As it stands right now the list is 67,000 lines long so I assume doing a macro might take a little bit to run…..

    Help would be greatly appreciated.

    -Ken
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Search and replace

    You can put this formula in F14:

    =IF(COUNTIF(A$1:A$5,E14)=0,$C$1,E14)

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Search and replace

    Try this one.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Search and replace

    Thanks so much.... Perfect!

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Search and replace

    You're welcome and thanks for rep+.

+ 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. Search and Replace
    By hsalazar in forum Excel General
    Replies: 2
    Last Post: 02-09-2012, 10:25 AM
  2. search and replace
    By nahem in forum Excel General
    Replies: 2
    Last Post: 02-12-2011, 01:08 PM
  3. Search and replace
    By steve_c in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-01-2008, 09:53 AM
  4. Search and Replace
    By dcoffin in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-18-2007, 07:17 AM
  5. [SOLVED] Limit Search & Replace's Replace All?
    By [email protected] in forum Excel General
    Replies: 4
    Last Post: 08-03-2006, 02:00 PM
  6. [SOLVED] Search and replace
    By Subu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2005, 11:05 PM
  7. [SOLVED] Search and replace
    By Subu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-09-2005, 02:05 PM
  8. Search and Replace
    By Rebecca in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 02-27-2005, 06:06 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