+ Reply to Thread
Results 1 to 2 of 2

macro to copy multiple rows based on cell entry

  1. #1
    Forum Contributor
    Join Date
    04-06-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    103

    macro to copy multiple rows based on cell entry

    hi there

    i have a workbook with 4 sheet which i have attached for reference.
    Page1,2 and 3 all contain account numbers and figures. Using a user entered value in cell A1 on the "Data" sheet, I would like to find this user entered value in column A on each of the "Page" sheets and copy the entire row into the Data sheet in to row 2 3 and 4.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro to copy multiple rows based on cell entry

    In B2: =INDEX(Page1!B:B, MATCH($A$1, Page1!$A:$A, 0))
    B3: =INDEX(Page2!B:B, MATCH($A$1, Page2!$A:$A, 0))
    B4: =INDEX(Page3!B:B, MATCH($A$1, Page3!$A:$A, 0))

    Now copy those three cells to the right.

    Change the value in cell A1 and all 3 rows will reevaluate.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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