+ Reply to Thread
Results 1 to 10 of 10

EXCEL Find variable data from one sheet and copy entire row to another sheet

  1. #1
    Forum Contributor
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    119

    Question EXCEL Find variable data from one sheet and copy entire row to another sheet

    I apologize in advanced if this has been asked before. I cannot find an answer no matter how hard I try.

    I have a spread sheet with multiple sheets that contain columns pertaining to staff names and payroll numbers.
    I have tried VLOOKUP with no success as the data is based off may unsorted lists and have formulas in place which make it impossible to continually sort and resort the data.

    I am searching for a Marco/VBA code that will allow me to input either a name or payroll number from one sheet called (Lookup) and find this data in the sheet called (From Adobe) from either column B (Payroll Number) or C (Name). Each column has formulas to accurately retrieve the data from another sheet which I do not want to break. When the data is found I would like the entire row corresponding to either the Payroll Number or Name to be copied back onto the sheet (Lookup) in another row (row 10) so that it does not corrupt the search data. It needs to overwrite any data that is already there. Effectively giving the appearance of a VLOOKUP process.

    The names are stored in one column as First Name then Surname with one space separating them, not multiple columns. If I could search via surname or first name or even a partial search rather than an exact search that would be ideal.

    Either having a pop up screen asking for the data I am looking for or entering the search criteria into a cell (B4) on sheet (Lookup) is acceptable.

    Thanks ahead of time.

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    This seems easier if you have a dummy spreadsheet for us to work with.

    Are you able to de-sensitise the data and upload a dummy spreadsheet here? I suspect this can be done with a formula.

  3. #3
    Forum Contributor
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    119

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    How can I upload a file?

  4. #4
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    Right at the bottom of this page you'll see a button that says "Go Advanced". Click that.

    Once the page loads, at the bottom there should be a section that says "Attachments", click on the link that says "Manage Attachments".

    From there, at the very top you can click on "Browse" and locate the file. Then click "Upload". And once that is done, go right to the bottom and "Close Window".

    The file should be attached then.

  5. #5
    Forum Contributor
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    119

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    Thank you for the advice.
    Please forgive if the file is clunky.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    So, the reason why your VLOOKUP isn't working is because the input you have in 'Vlookup' cell B4 are numbers, whereas the payroll numbers in the 'From Adobe' sheet are texts.

    Either, change the formula in
    'From Adobe' cell B2:=
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    OR, change the formula in...
    'Vlookup' cell B8:=
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The same TEXT function will need to be applied to the other VLOOKUPs.

    That should do the trick, no Macro required.

  7. #7
    Forum Contributor
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    119

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    I cannot thank you enough. Of course it is obvious once you point it out. I doubt i would have worked it out though.

    This works great for the payroll numbers, but i cannot get it to work for the name search

    If I had multiple spreadsheets like this for various departments, then gathered/linked the (FromAdobe) sheets from each one into another parent file, how do you think the best way to perform a search across multiple sheets in the parent workbook would look?
    Last edited by Crawfy; 03-27-2017 at 04:49 AM.

  8. #8
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    The name search will be tougher due to typos and accidental "spaces" (e.g. _John Smith vs John Smith). This will either have to be dealt at the source, to make sure no typos, extraneous spaces, and to a certain degree, capitalisation of letters. These can be addressed within the formula, but it'll be long and complex.

    To find something across multiple sheets, I've seen it before, but it's not easy (and I can't remember how to do it). The simplest way I can think of is to first bring in all the individual 'FromAdobe' sheets into the Parent workbook, then another sheet in the Parent workbook that combines them all into a single table. Otherwise, I recommend starting a new Thread with the terms "LOOKUP across multiple sheets" or similar.
    Last edited by quekbc; 03-27-2017 at 05:11 AM.

  9. #9
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    Duplicated message. Deleted.

  10. #10
    Forum Contributor
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    119

    Re: EXCEL Find variable data from one sheet and copy entire row to another sheet

    I plan to ensure the source names are correct. I tried this on the one spreadsheet with some good results for partial names entered.
    Please Login or Register  to view this content.
    The next thing is to return a list of matching partial names, for example, looking up all names "Jane" rather than the first.
    I'll post new threads for these questions.

    I appreciate your help. I'll mark this thread as Solved.

+ 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. find match and copy entire line to new sheet
    By cmccabe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2016, 10:01 AM
  2. Replies: 6
    Last Post: 11-13-2015, 07:36 AM
  3. Replies: 2
    Last Post: 01-22-2014, 05:36 PM
  4. Replies: 3
    Last Post: 10-31-2013, 03:41 PM
  5. [SOLVED] VBA to find cell value and copy entire row to next available row on another sheet
    By BBen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-02-2012, 04:59 PM
  6. Macro to find the value and copy the entire row to another sheet
    By pike in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-03-2011, 07:00 AM
  7. Replies: 3
    Last Post: 11-19-2010, 02:04 AM

Tags for this Thread

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