Results 1 to 12 of 12

Find and Replace using cells on different sheets

Threaded View

  1. #1
    Registered User
    Join Date
    06-26-2019
    Location
    California, US
    MS-Off Ver
    Office 365
    Posts
    36

    Find and Replace using cells on different sheets

    I'm trying to make the macro find values from column A on Sheet1 in column A on Sheet2. If that value is found, then it will use Column B from Sheet1 to replace a value on Column B in Sheet2.

    So Sheet1 will look like this.
    A Annie
    B Billy
    C Charles
    Sheet2
    A Lee
    (empty) (empty)
    C Lopez
    Wanted change in Sheet2
    A Annie
    (empty) (empty)
    C Charles

    I've been trying to make a loop out of it, since the actual sheet will have like 40 rows to find and replace.
    Dim i As Long
    For i = 1 To 40
     
        With Sheets("Sheet1" & i)
            .Range("A:B").Replace What:="Sheet2(Cells(i, 2))", Replacement:="Sheet2(Cells(i, 2))", LookAt:=xlWhole
        End With
     
    Next
    Last edited by Exceloof; 07-18-2019 at 12:51 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find and replace in several (not all) sheets
    By blackberry2012 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2019, 11:49 AM
  2. [SOLVED] Replace blank cells with ZERO using Find Replace
    By makinmomb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2014, 04:47 PM
  3. [SOLVED] Find & Replace Matching Cells Across Multiple Sheets
    By texmexcel in forum Excel General
    Replies: 5
    Last Post: 12-15-2013, 05:25 AM
  4. [SOLVED] Find & Replace All Sheets Using VBA
    By tmontg2 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-28-2012, 04:06 PM
  5. Copmpare/Find and replace cells in two separate workbooks across multiple sheets
    By jmarrxx in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2012, 09:53 AM
  6. Find and replace on all sheets
    By Cornwell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2010, 10:41 AM
  7. Find, and replace but copy cells before replace
    By raehippychick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-05-2007, 08:16 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