Copy Row based on value in Other cell

  • Fairly simple one hopefully but only new to excel. Do not have any knowledge of defining variables and the like but have taken a stab.
    Data in multiple rows is generated in the (3)Accounts spreadsheet according to data in row 2 of (1)National Spreadsheet. As such all values in accounts are from formulas and will change upon the changing of corresponding values in (1)National. The idea is to copy the entire row for the specific member in the accounts sheet and paste only the values in its exact place. The row that is specific to that member is identified by a matching invoice number in the sheet (1)National in cell T2.


    Obviously the code below isn't right otherwise it would work but you can hopefully see what kind of logic I'm trying to step through to achieve this, any help would be greatly appreciated.


  • Re: Copy Row based on value in Other cell


    On second thoughts, there's more than 1 error, this might be a suitable replacement (typed freehand, untested)


    The Search is limited to Col A only. If you really do want to search the entire worksheet then replace

    Code
    Set r = Sheets("(3)Accounts").Columns(1).Find( _

    with

    Code
    Set r = Sheets("(3)Accounts").Cells.Find( _
  • Re: Copy Row based on value in Other cell


    Thanks a million cytop, works perfectly


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!