Consulting

Results 1 to 5 of 5

Thread: PO numbers

  1. #1
    VBAX Regular
    Joined
    May 2005
    Posts
    28
    Location

    PO numbers

    Hello everybody:



    I have two big spreadsheets. Please see a sample attached.



    I want to use some formula to insert the po number on sheet 2 to the column C of sheet 1, according to the same invoice numbers on both sheets.



    Thank you for your help!

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hi Jane,

    Any chance you can alter sheet2 so that 'invoice' is before 'po'? If they were switched, you could use the following to get the PO number:

    =IF(ISERROR(VLOOKUP(A3,Sheet2!$A$2:$D$14,2,FALSE)),"",VLOOKUP(A3,Sheet2!$A$ 2:$D$14,2,FALSE))

    otherwise, you'll have to use:

    =IF(ISERROR(MATCH(A3,Sheet2!$B$2:$B$14,0)),"",INDEX(Sheet2!$A$2:$A$14,MATCH (A3,Sheet2!$B$2:$B$14,0)))

    Matt

  3. #3
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    or try

    =SUMPRODUCT(--((Sheet2!B$2:B$14)=A3),--(Sheet2!A$2:A$14))

    2 questions
    How big are your spreadsheets as this could influence the method?
    Do you need to retain the formula or just need the data?
    Regards
    MD
    Last edited by mdmackillop; 11-29-2005 at 11:51 AM. Reason: Queries added.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    VBAX Regular
    Joined
    May 2005
    Posts
    28
    Location
    I tried the sample spreadsheet and it works. However, the big spreadsheet doesn't work. I don't know and will try torrow again. The spread sheet has abount 2000 lines

    Thank you very much!

  5. #5
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Jane,
    I had some problems with your cell formats. It might be worth checking these if you have trouble.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •