+ Reply to Thread
Results 1 to 3 of 3

Array Commands to solve this

  1. #1
    Registered User
    Join Date
    06-27-2011
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    55

    Array Commands to solve this

    Dear Expert,

    I am not familiar wih Function Array. But I think only array can solve this.

    I have put into Excel file.

    Column E is my dersired outcome.

    If either exception 1 or exception 2 contains "x", shows blank

    If both exception 1 & exception 2 contains "x" and then have to check if ID appears the first time

    If ID appears the first time, set expiry date to be Date + 90 days

    If ID appears not the first time, check if Trade date is greater than the first time expiry date for that ID

    If it's greater than first time expiry, default remarks "passed expiry date"

    If Trade date is smaller than the first time expiry date, refer to the first time expiry date for that ID

    I hope expert can help me as a lot of conditions involved.

    Thanks
    Elton
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-27-2011
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Array Commands to solve this

    =IF(AND(C2="x",D2="x"),IF(B2>IF(COUNTIFS($A$2:A2,A2,$C$2:C2,"x",$D$2:$D2,"x")>1,VLOOKUP(A2,$A$2:$E$15,5,0),EDATE(B2,3)),"Passed expiry date",IF(COUNTIFS($A$2:A2,A2,$C$2:C2,"x",$D$2:$D2,"x")>1,VLOOKUP(A2,$A$2:$E$15,5,0),EDATE(B2,3))),"")

    Someone helped me already. Thanks

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Array Commands to solve this

    Try this in E2 Drag/Fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Note that your request is for the first date + 90 days, but your sample sheet indicates 92 days.
    Change the 90 in the formula as required.

    [EDIT]
    I hope the "Someone" wasn't on a different forum, cross posting without warning isn't nice.

    For the record I missed a condition and it is now corrected.
    Attached Files Attached Files
    Last edited by Marcol; 05-01-2013 at 05:31 AM. Reason: Updated with missed condition corrected.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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