+ Reply to Thread
Results 1 to 4 of 4

Copy row from Sheet 1 to Sheet 2 when a cell in Column E reads "Sent Out".

  1. #1
    Registered User
    Join Date
    05-27-2014
    Posts
    2

    Copy row from Sheet 1 to Sheet 2 when a cell in Column E reads "Sent Out".

    I have a workbook with 2 work sheets. The first sheet is a list of all items with a status of either "Sent Out", "Job Won" or "Job Lost". I want to take any row that has a status of "Sent Out" and copy it to sheet 2. Likewise, when I update sheet 1 from "Sent Out" to either "Job Won" or "Job lost, I want that row to be deleted from sheet 2 (making sheet 2 solely those with a status of "Sent Out").

    To go even further, I would like the copied data to be put under the correct customer name heading in sheet 2 when it is copied over.
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Copy row from Sheet 1 to Sheet 2 when a cell in Column E reads "Sent Out".

    This can definitely be done.

    A3:

    =INDEX(Master!A$2:A$190,SMALL(IF(Master!$B$2:$B$190='Sent Out'!$A$1,IF(Master!$E$2:$E$190="Sent Out",ROW(Master!$A$1:$A$189))),ROW(A1)))

    B3:

    =INDEX(Master!B$2:B$190,SMALL(IF(Master!$B$2:$B$190='Sent Out'!$A$1,IF(Master!$E$2:$E$190="Sent Out",ROW(Master!$A$1:$A$189))),ROW(B1)))

    C3:

    =INDEX(Master!D$2:D$190,SMALL(IF(Master!$B$2:$B$190='Sent Out'!$A$1,IF(Master!$E$2:$E$190="Sent Out",ROW(Master!$A$1:$A$189))),ROW(D1)))

    D3:

    =INDEX(Master!E$2:E$190,SMALL(IF(Master!$B$2:$B$190='Sent Out'!$A$1,IF(Master!$E$2:$E$190="Sent Out",ROW(Master!$A$1:$A$189))),ROW(E1)))

    E3:

    =INDEX(Master!F$2:F$190,SMALL(IF(Master!$B$2:$B$190='Sent Out'!$A$1,IF(Master!$E$2:$E$190="Sent Out",ROW(Master!$A$1:$A$189))),ROW(F1)))


    Note: Each of these is an array formula, confirmed with Ctrl+Shift+Enter instead of just hitting Enter to exit the cell.

    Then drag all 5 down. Note that C3's formula omits the index of column C, since you aren't showing the Contact's name.
    For each successive block (Customer) you'll use the same 5 starting formulas, but set the =A1 to the next Customer Name. (The second block's Customer name is in A10.)
    Attached Files Attached Files
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    05-27-2014
    Posts
    2

    Re: Copy row from Sheet 1 to Sheet 2 when a cell in Column E reads "Sent Out".

    Thank you...and it looks great! ...until I touch it. I have been trying to figure out how to finish it with no luck.. Can you take a look at the next customer for me?
    Attached Files Attached Files

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Copy row from Sheet 1 to Sheet 2 when a cell in Column E reads "Sent Out".

    I see. The references of the formulas are adjusting themselves.

    In order to prevent this, your best bet is to click A3, then click F2 to enter the cell, select the formula with your cursor, Ctrl+C to copy it, then hit Escape.

    Then go into the cell in A14, and hit Ctrl+V to paste A3's actual formula. Then just reposition =A1 to =A12 so it points to Brivar instead of JB Donaldson. Now you can copy it downwards.

+ 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: 7
    Last Post: 04-15-2014, 03:41 PM
  2. How to copy a column to another sheet if a cell is "test"
    By matwork in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-24-2013, 12:20 PM
  3. [SOLVED] Copy column from sheet 2 if specific cell in sheet 1 is "QLD"
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2012, 05:08 PM
  4. [SOLVED] Match second sheet column "F" with First sheet column "M" & copy column "C" value
    By johncena in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2012, 11:44 AM
  5. Need to copy text from full "A" column to "A" column on new sheet....
    By Stonesifer in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 02-15-2011, 02:50 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