+ Reply to Thread
Results 1 to 4 of 4

Copy Data from Sheet1 to Sheet2 depending on input on Sheet1

  1. #1
    Registered User
    Join Date
    03-25-2014
    Location
    Poole, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Copy Data from Sheet1 to Sheet2 depending on input on Sheet1

    Hi,

    I am trying to copy data from one worksheet to another based on the input of column E. In Column E I have a drop down box with options of yes or no. If I put yes I want that entire row running from A to E to be copied to sheet2.

    Can somebody please, please help me?

    Regards
    Jason

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Copy Data from Sheet1 to Sheet2 depending on input on Sheet1

    If you attach a sample workbook (the FAQ describes how to), I can set this up for you.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-25-2014
    Location
    Poole, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Copy Data from Sheet1 to Sheet2 depending on input on Sheet1

    Hi,

    Please find sample attached.

    Regards
    Jason
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Copy Data from Sheet1 to Sheet2 depending on input on Sheet1

    The attached file does this for you.

    For convenience, I have inserted a new column A in both sheets and used these as helper columns - they can be hidden if you wish. In A4 of Sheet1 I've used this formula:

    =IF(F4="yes",MAX(A$3:A3)+1,"-")

    which is copied down to the bottom of your table. It will set up a unique sequential number for each record which has Yes in column F. Then in A4 of Sheet2 I have this formula:

    =IFERROR(MATCH(ROWS($1:1),Sheet1!A:A,0),"-")

    which finds the row(s) where those unique numbers occur. Then in B4 I have this formula:

    =IF(OR($A4="-",$A4=""),"",IF(INDEX(Sheet1!B:B,$A4)="","",INDEX(Sheet1!B:B,$A4)))

    which returns the appropriate data from column B of Sheet1. This formula can be copied across into C4:E4 to retrieve data from those columns. Finally, the formulae in A4:E4 can be copied down as far as you think you need them - I've just copied to row 20, but the hyphens help to show you how far the formulae are active for.

    Then you can just change some of the entries in column F of Sheet1 and see the display on Sheet2 change automatically.

    Hope this helps.

    Pete
    Attached Files Attached Files

+ 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. Replies: 6
    Last Post: 07-25-2013, 02:58 PM
  2. [SOLVED] Take Data From Column on Sheet1 and Insert Into Next Blank Row on Sheet2 Then Clear Sheet1
    By abutler911 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2013, 06:30 PM
  3. Replies: 3
    Last Post: 06-06-2012, 05:36 AM
  4. [SOLVED] Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row
    By dmlovic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2012, 08:42 AM
  5. how to copy sheet1 to sheet2 and refresh sheet1
    By ansmyq in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2009, 02:42 PM

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