1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Multiple Find Replace

Discussion in 'Business Applications' started by yolle555, Jan 18, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. yolle555

    yolle555 Thread Starter

    Joined:
    Jan 18, 2013
    Messages:
    5
    Hi!
    I would need an excel macro for mac to do this:

    Search Column C for cell(s) containing the content of B1 and then replace all instances of B1 (located in Column C) with the content of Cell A1. and so on, and so on.

    Preferably I would have the B and C column in a different sheet or workbook.

    Hope that anyone can help. Thanks.
     
  2. CDHarm

    CDHarm

    Joined:
    May 26, 2011
    Messages:
    255
    yolle555,

    Welcome to the forum.
    A workbook with an example will help.
     
  3. yolle555

    yolle555 Thread Starter

    Joined:
    Jan 18, 2013
    Messages:
    5
    Thanks for your reply.
    So, I am attaching an example.
    On sheet 1 there are numbers in column A. I would like to put text in column B on sheet 1 according to the "code" on sheet 2.
    So, wherever there is 44 in column A sheet1 I would like to put A in column B, where there is 48 --> B and 59 --> C.

    So, I would like the macro to proceed in this way: take value from A1 in Sheet2 and look for this value in column A in sheet 1. Wherever this value appears in column A sheet 1 put value B1 from sheet 2 into appropriate row in column B sheet 1.
    Do this for all the values in column A on sheet 2.

    I hope I made it clear enough.

    Thank you very much.
     

    Attached Files:

    • Q.xlsx
      File size:
      27.1 KB
      Views:
      35
  4. CDHarm

    CDHarm

    Joined:
    May 26, 2011
    Messages:
    255
    Hi,

    I'm showing you 2 ways to do this. In the attached workbook for column B I used a vlookup formula.
    For column C I used a code that uses the vlookup.
     

    Attached Files:

    • Q.xlsm
      File size:
      15.9 KB
      Views:
      48
  5. yolle555

    yolle555 Thread Starter

    Joined:
    Jan 18, 2013
    Messages:
    5
    Thank you very very much!

    Bor
     
  6. yolle555

    yolle555 Thread Starter

    Joined:
    Jan 18, 2013
    Messages:
    5
    Thank you very very much! Works perfectly.


    EDIT: Actually, I have some troubles changing it to suit my particular problem. I will ask for more help if I do not succeed. Anyhow, thank you very much.
     
  7. yolle555

    yolle555 Thread Starter

    Joined:
    Jan 18, 2013
    Messages:
    5
    I guess I was to quick to say it worked...
    Did I mention I am using a mac?
    I tried to reproduce the vlookup formula on my data but I did not suceed. It kept returning #N/A. And I really looked carefully at the instructions for the formula.
    And even though your formula worked in the q.xlsm file, it showed an error - see attached photo.
    Another thing is that in my original file the column with the data is not leftmost - ofcourse this is not so much of a problem, but still.
    Thank you for your help-
     

    Attached Files:

  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1085828

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice