+ Reply to Thread
Results 1 to 9 of 9

Transferring data from Sheet1 to Sheet2 based on criteria

  1. #1
    Registered User
    Join Date
    07-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Transferring data from Sheet1 to Sheet2 based on criteria

    Hello all. As per the site guidance I've had a look through some threads and couldn't find an equivalent problem. I'd be grateful if someone could point me in the right direction. Bear with me...

    In the screen-grab below, Sites 1 - 4 are listed in row 10 with a series of of corresponding tasks in column B. The columns D, G, J and M show what the status of each task is in relation to each site. So far, so good.

    Now, each task has a 'Status' number against it (1-5). These values are selected from a drop-down. As can be seen from the colour legend at the top of the spreadsheet, numbers 1-4 mean the task is still ongoing or outstanding. If the value of the task is '5', that means it is complete.

    Spreadsheet1.jpg

    What I would like the spreadsheet to do is to read across row 11 (actually rows 11 to 50 inclusive) and look for tasks which are still open (values between 1-4), THEN transfer them onto Sheet2. This is not the difficult bit, and I could probably figure it out in time. HOWEVER, what I am unable to do is to list the task in order in Sheet2.

    In the example below (which I've entered manually), the information that is contained in Sheet1 has been automatically duplicated to Sheet2, based on the condition that the tasks are still open (i.e. returned a value between 1-4).

    Spreadsheet2.jpg

    What I'd also like the spreadsheet to do is to automatically populate the Sheet2 list when a status in Sheet1 gets updated. For example, if task 1 at site 4 gets updated to status 5 (i.e. 'Complete') then that task is removed from the list and tasks 2 and 3 are moved up a row to take its place.

    I hope I've made this clear enough. Thanks in advance for any help!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,934

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    It is easy if you use a column of helper formulas.

    I have assumed that your Sheet1 is named something like "Work List" - you can change it in the formulas below.

    In cell AA11 of "Work List", enter the formula:

    =IF(MIN(D11,G11,J11,M11)<5,ROW(),"")

    and copy down to match your list on that sheet. Now You have a column of helper formulas.

    Then on the second sheet, in cell B8, enter the formula

    =IFERROR(INDEX('Work List'!A:A,SMALL('Work List'!$AA:$AA,ROW(A1))),"")

    And in C8

    =IFERROR(IF(INDEX('Work List'!D:D,SMALL('Work List'!$AA:$AA,ROW(A1)))<5,INDEX('Work List'!D:D,SMALL('Work List'!$AA:$AA,ROW(A1))),""),"")

    And in D8

    =IFERROR(IF(INDEX('Work List'!G:G,SMALL('Work List'!$AA:$AA,ROW(A1)))<5,INDEX('Work List'!G:G,SMALL('Work List'!$AA:$AA,ROW(A1))),""),"")

    And in E8

    =IFERROR(IF(INDEX('Work List'!J:J,SMALL('Work List'!$AA:$AA,ROW(A1)))<5,INDEX('Work List'!J:J,SMALL('Work List'!$AA:$AA,ROW(A1))),""),"")

    And in F8

    =IFERROR(IF(INDEX('Work List'!M:M,SMALL('Work List'!$AA:$AA,ROW(A1)))<5,INDEX('Work List'!M:M,SMALL('Work List'!$AA:$AA,ROW(A1))),""),"")

    Then copy those five formulas down until they return blanks.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    07-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    Many thanks, Bernie. Can I clarify a few things before I attempt this?

    Quote Originally Posted by Bernie Deitrick View Post
    In cell AA11 of "Work List", enter the formula:

    =IF(MIN(D11,G11,J11,M11)<5,ROW(),"")

    and copy down to match your list on that sheet. Now You have a column of helper formulas.
    What do you mean by 'copy it down'? Do you mean extend the D11, G11, J11 and M11 to read D11:D50 (for example), G11:G50, J11:J50?

    Quote Originally Posted by Bernie Deitrick View Post
    And in F8

    =IFERROR(IF(INDEX('Work List'!M:M,SMALL('Work List'!$AA:$AA,ROW(A1)))<5,INDEX('Work List'!M:M,SMALL('Work List'!$AA:$AA,ROW(A1))),""),"")

    Then copy those five formulas down until they return blanks.
    Again, what do you mean by 'copy it down'? Sorry if this appears stupid!

    Thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,288

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    Copy down means that you enter the formula into the cell, then you grasp the little black square at the bottom right of the cell and drag downwards - this copies the formula down the column.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    07-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    Thanks Ali.
    Last edited by AliGW; 10-18-2017 at 09:28 AM. Reason: Unnecessary quotation removed.

  6. #6
    Registered User
    Join Date
    07-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    Thanks, but it's not working. I've attached the file for ease of viewing.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    Thanks again for your help.

    I've figured out the formulas and am almost there. However, I seem to be reading from column A1 in Sheet1, rather than A2. In other words, the formula is duplicating the number of the task, not the wording of the task itself, which is what I'm after.

    Spreadsheet3.jpg

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,934

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    My bad - Change the A:A in the formula of B8 to B:B (or whatever column) with the wording that you are interest in:

    =IFERROR(INDEX('Work List'!B:B,SMALL('Work List'!$AA:$AA,ROW(A1))),"")

  9. #9
    Registered User
    Join Date
    07-20-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transferring data from Sheet1 to Sheet2 based on criteria

    Bullseye!

    Many thanks, Bernie. You're a star.

+ 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. Cut and paste data from raw data to sheet1 and sheet2. based on criteria
    By xlhelp7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2015, 12:26 AM
  2. move data from sheet1 to sheet2 based on date in column1 of sheet1
    By pcaldwell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2014, 03:20 PM
  3. How to skip 1 row while transferring data from sheet2 to sheet1?
    By mso3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-08-2014, 12:23 AM
  4. [SOLVED] Move data from SHEET1 to SHEET2 based on Selected criteria...like an adv filter
    By gspivey79 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-03-2012, 02:06 PM
  5. Replies: 3
    Last Post: 06-06-2012, 05:36 AM
  6. [SOLVED] Copying Data from Sheet1 to sheet2 based on criteria for copy
    By pprane in forum Excel General
    Replies: 1
    Last Post: 04-22-2012, 02:32 AM
  7. Copying Data from Sheet1 to sheet2 based on criteria for copy
    By pprane in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2012, 02:07 AM

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