+ Reply to Thread
Results 1 to 6 of 6

Dates with conditions

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Dates with conditions

    Hi All

    I hope someone can help with this.

    I have 2 sheets - one with orders and the second with customer accounts. I want to populate the customer accounts sheet with the dates of the orders automatically using a formula or function. Is this possible?

    I have attached an example.

    Any help would be great.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: Dates with conditions

    Sounds like a simple INDEX/MATCH or VLOOKUP (if the order numbers are unique). However, looks like you attached the wrong example, no order numbers, or dates
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    03-05-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Dates with conditions

    You are right! Sorry correct version attached.
    Attached Files Attached Files

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dates with conditions

    Try this...

    Enter this array formula** in cell B2:

    =IFERROR(INDEX(Orders!$A:$A,SMALL(IF(Orders!$B$2:$B$23=$A2,ROW(Orders!$B$2:$B$23)),COLUMNS($B2:B2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Format as Date

    Copy across to K2 then down to B11:K11
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    03-05-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Dates with conditions

    Hi Tony

    Thanks for your help. The solution worked great however I tried entering a further condition and it no longer work. Can you tell me whats wrong with this?


    =IFERROR(INDEX(Orders!$A:$A,SMALL(IF(Orders!$B$2:$B$23=$A2,ROW(Orders!$B$2:$B$23))*(IF(Orders!$D$2:$D$23=$A2,ROW(Orders!$D$2:$D$23)),COLUMNS($B2:B2)),"")))
    Attached Files Attached Files

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dates with conditions

    Looks like you want to include if it's a repeat order or not.

    For repeat order = Y:

    =IFERROR(INDEX(Orders!$A:$A,SMALL(IF(Orders!$B$2:$B$23=$A2,IF(Orders!$D$2:$D$23="Y",ROW(Orders!$B$2:$B$23))),COLUMNS($B2:B2))),"")

    For repeat order = N:

    =IFERROR(INDEX(Orders!$A:$A,SMALL(IF(Orders!$B$2:$B$23=$A2,IF(Orders!$D$2:$D$23="N",ROW(Orders!$B$2:$B$23))),COLUMNS($B2:B2))),"")

    Both are still array entered!

+ 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. [SOLVED] IF function with dates and conditions
    By Mary24 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-12-2012, 10:31 PM
  2. compare dates using 2 conditions
    By reddwarf in forum Excel General
    Replies: 13
    Last Post: 09-08-2011, 10:22 AM
  3. Time between 2 dates with 2 conditions
    By 13sydwest in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-22-2011, 07:33 AM
  4. Sum based on dates and Conditions
    By mikello in forum Excel General
    Replies: 2
    Last Post: 08-10-2009, 07:00 AM
  5. Multiple IF conditions with dates, how to
    By brazool in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-06-2008, 06:56 AM

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