+ Reply to Thread
Results 1 to 3 of 3

Auto filling a form with conditions

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    Myrtle Beach
    MS-Off Ver
    Excel 2007
    Posts
    25

    Auto filling a form with conditions

    Hi,
    I want the information I enter in worksheet 1 to automatically be loaded in the form on worksheet 2. The problem is: I don't want worksheet 2 to auto fill information on a PO who's status is "Not Done" and I don't want there to be any blanks in my form on worksheet 2. I added an attached basic file in excel 2003 which may help also since the margins on the example below are confusing.

    Worksheet 1:

    A B C D
    1 PO Number Status Ship Date Tracking Number
    2 101 Not Done N/A N/A
    3 102 Done 10-31-2012 1234567
    4 103 Not Done N/A N/A
    5 104 Done 11-5-2012 7654321

    Worksheet 2:

    A B C
    1 PO Number Ship Date Tracking Number
    Formula Needed: =LOOKUP(A2,SHEET1!A:A,SHEET1!C:C =LOOKUP(A2,SHEET1!A:A,SHEET1!D:D
    In A1 of Worksheet 2 I want
    The PO number (Column A) in
    worksheet 1 B2 IF the status is
    "Done". If the status is "Not Done",
    I want to go to the next PO number
    that is "Done" and put that PO number
    in this cell.
    Attached Files Attached Files
    Last edited by matt1020; 11-11-2012 at 08:21 PM. Reason: I cant understand my post because the margins to my worksheet example are messed up

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Auto filling a form with conditions

    Try this.

    On sheet1, E2, copied down, use this...
    =IF(B2="Done",MAX($E$1:E1)+1,"")

    then on sheet2, copied down and across, use this...
    =IFERROR(INDEX(Sheet1!$A$1:$E$5,MATCH(ROW(A1),Sheet1!$E$1:$E$5,0),MATCH(Sheet2!A$1,Sheet1!$A$1:$E$1,0)),"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-06-2012
    Location
    Myrtle Beach
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Auto filling a form with conditions

    Thanks!
    Your answer was just what I was looking for. You made my job so much easier and saved me a lot of time.
    Regards,
    Matt

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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