+ Reply to Thread
Results 1 to 2 of 2

Macro to Search column and if found, copy a cell within the worksheet

  1. #1
    Registered User
    Join Date
    09-20-2007
    Posts
    4

    Macro to Search column and if found, copy a cell within the worksheet

    Here are how my columns are broken down:

    A: Name
    B: Department
    ....
    E: Reviewed By
    F: Reviewer Dept
    ...

    I have all of the information for columns A and B. What I want to do is when I type a name into E, I can select that cell and run a macro that will search through Column A for an exact match. If it finds a match, it will copy cell B from that row to cell F from the originally selected row (will paste the result into cell F).

    The names in A may be there once, multiple times, or not at all. It only needs to find the first result, do the copy/paste, and then can end.

    I am not familiar with how to code it, or all of what excel offers for coding, but my basic idea was that the initially selected cell, when you chose to run the macro, it would maybe store that cell's text to a variable, and also store the row number. It would then search column A for the first result, copy the Department from column B next to it, and then paste it up in F. It seems simple to me, but again I don't know coding well enough.

  2. #2
    Registered User
    Join Date
    09-20-2007
    Posts
    4
    I actually got this working using VLookup

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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