+ Reply to Thread
Results 1 to 5 of 5

Find and replace using arrays

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Find and replace using arrays

    Hello everyone
    I have the range("A3:D" & last row) in sheet Temp
    and the range D2:H2 and I would like to replace any value withing the range D2:H2 with "Y" in the array of the range in Temp sheet
    for example : the first value in the array of D2:H2 is 10 and it is in Temp sheet in yellow cells ..that's the yellow cells would be replaced with "Y"
    This is my try but didn't work as expected

    Please Login or Register  to view this content.
    Thanks advanced for help
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Find and replace using arrays

    Hi,

    You are only processing column A. Try this version
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Find and replace using arrays

    Thanks a lot Mr. xlnitwit for great help
    Is there another easier way to do that task ..? as I think it is long way ..
    Regards

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Find and replace using arrays

    It is simpler to use Range.Replace I feel
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Find and replace using arrays

    Thanks a lot for this great and wonderful help Mr. xlnitwit
    Best and kind regards

+ 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] Replace loops with arrays
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-13-2016, 10:11 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] New to arrays-where do I find a good beginners guide to multi dimensional arrays
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-04-2013, 07:44 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. Find and Replace Arrays
    By s2nguyen in forum Excel General
    Replies: 5
    Last Post: 10-29-2008, 10:57 AM

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