+ Reply to Thread
Results 1 to 5 of 5

Trying to copy data from a row on another sheet using the results of the ROW command.

  1. #1
    Registered User
    Join Date
    11-16-2020
    Location
    Elk Grove Village, Illinois
    MS-Off Ver
    Office '13
    Posts
    3

    Trying to copy data from a row on another sheet using the results of the ROW command.

    So,

    I have an excel file that I'm using to keep track of customer information. The main page has all of the data on the customers and the other pages have the detailed records of every interaction I had with them. The main page only shows the most recent interaction notes.

    I'm trying to set it up so that the main page shows the latest notes I took on the customer in the records page so I don't need to type it twice. So far, I've managed to program it so that it checks the latest date of said customer and then tells me the row number of that entry. I want to then take the resulting row number that was the output, and create a formula to copy the data on x row to my main page.

    Is there a way to do this?


    Here is an example of the formula I'm using to get the number: =MAX(IF(Table3[[#All],[Contact]]="Sample Name",ROW(Table3[[#All],[Encounter Details]])))
    Last edited by evanelias; 11-16-2020 at 12:49 PM. Reason: Solved

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,087

    Re: Trying to copy data from a row on another sheet using the results of the ROW command.

    If you've got a row number, you can use INDEX on the relevant column(s) to return the information you want.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-16-2020
    Location
    Elk Grove Village, Illinois
    MS-Off Ver
    Office '13
    Posts
    3

    Re: Trying to copy data from a row on another sheet using the results of the ROW command.

    Thanks for replying!

    The problem with using INDEX is that the row number will change if I add a new entry. I would need to make the row number a variable or something to make it work, which I don't know how to do.

  4. #4
    Registered User
    Join Date
    11-16-2020
    Location
    Elk Grove Village, Illinois
    MS-Off Ver
    Office '13
    Posts
    3

    Re: Trying to copy data from a row on another sheet using the results of the ROW command.

    Update!

    I'm sorry, I'm still new with Excel. I tried a few more variations with INDEX and it worked!

    Thanks for the help!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,087

    Re: Trying to copy data from a row on another sheet using the results of the ROW command.

    It should automatically adjust if you insert a row.

    Post a sample workbook.

+ 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. Code to search data base and copy results to a new sheet
    By Not-an-excel-wizard in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2020, 09:09 AM
  2. Command Button to copy data to second sheet
    By testacco1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2017, 05:39 PM
  3. [SOLVED] Multiple Command Buttons & results in a new sheet.
    By jhonnyexcel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-24-2016, 01:41 PM
  4. [SOLVED] VBA Code to copy all data from sheet 1 and paste it to sheet5 using a command button
    By Angnz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-10-2013, 10:06 PM
  5. Copy Data to a New Sheet if criteria match (multiple) using a Command Button
    By bambobeee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-03-2013, 12:37 AM
  6. Copy row of data from severla worksheets to results sheet
    By wardga in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2010, 10:31 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