+ Reply to Thread
Results 1 to 8 of 8

Distinct List & Matching

  1. #1
    Registered User
    Join Date
    04-26-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    13

    Distinct List & Matching

    Hi All,

    I have an invoice database that I am trying to pull information from to auto-generate invoices based on a specific date range.

    COLUMN A - Invoice Dates (raw data)
    COLUMN B - Invoice Numbers (raw data)

    COLUMN D - Invoice Numbers (invoice template)
    COLUMN E - Invoice Dates (invoice template)
    COLUMN G - Specified Invoice Date Range

    The goal is to get invoice numbers data from Column B, which have corresponding date data in Column A, to auto-fill in Column D if invoices fall within the date range in Column G. From there, I would like the dates for Column E to correlate with the invoice number in Column D, based on the dates data in Column A.

    ________________________________________

    Current formula in cells D11:D30 is:

    =IFERROR(INDEX($B$2:$B$21,MATCH(0,COUNTIF($D$11:D11,IF(($G$8>=$A$2:$A$21)*($G$6<=$A$2:$A$21),$B$2:$B$21,$D$11)),0)),"")

    *please note that cell changes to D12, D13, etc based on row...


    Current formula in cells E11:E30 is:

    =INDEX($B$2:$B$21,MATCH(D11,$A$2:$A$21,0))

    *please note that cell changes to D12, D13, etc based on row...

    ________________________________________


    For some reason the formulas currently in columns D & E are not working properly to generate the desired results.

    Any and all help would be greatly appreciated to figure this out quickly!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Distinct List & Matching

    Can you use Advanced Filter instead of formula?
    Attached Files Attached Files

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Distinct List & Matching

    Try this:

    =IFERROR(INDEX($B$2:$B$21,MATCH(0,COUNTIF($D$10:D10,IF(($G$8>=$A$2:$A$21)*($G$6<=$A$2:$A$21),$B$2:$B$21,$D$10)),0)),"")

    confirmed with CTRL+SHIFT+ENTER (not just ENTER).

    And this:

    =INDEX($A$2:$A$21,MATCH(D11,$B$2:$B$21,0))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    04-26-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    13

    Re: Distinct List & Matching

    Quote Originally Posted by AliGW View Post
    Try this:

    =IFERROR(INDEX($B$2:$B$21,MATCH(0,COUNTIF($D$10:D10,IF(($G$8>=$A$2:$A$21)*($G$6<=$A$2:$A$21),$B$2:$B$21,$D$10)),0)),"")

    confirmed with CTRL+SHIFT+ENTER (not just ENTER).

    And this:

    =INDEX($A$2:$A$21,MATCH(D11,$B$2:$B$21,0))
    Hi Ali,

    I tried your suggestion, but now the destination cells in Column D are all blank and destination cells in Column E are #N/A

    Thoughts?

  5. #5
    Registered User
    Join Date
    04-26-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    13

    Re: Distinct List & Matching

    Quote Originally Posted by JieJenn View Post
    Can you use Advanced Filter instead of formula?
    I tried this out, but I'm working to make this file as easy/user friendly as possible for my colleagues... few steps as possible. I'll look into it though.

    Thank you!!!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Distinct List & Matching

    You have not entered the first formula as an array. When you do, you will see curly brackets appear either end of it. Put your cursor in the first cell after the formula, then hold down CTRL+SHIFT and press ENTER whilst holding them down. Then copy down. Don't try to type the brackets yourself - it won't work.

    Excel 2016 (Windows) 32 bit
    D
    E
    10
    INVOICES
    DATE
    11
    T055687
    01/11/2016
    12
    T066789
    01/11/2016
    13
    T068890
    01/11/2016
    14
    T038901
    02/11/2016
    15
    T012355
    03/11/2016
    16
    T062456
    04/11/2016
    17
    T034887
    04/11/2016
    18
    T056687
    07/11/2016
    19
    T057589
    07/11/2016
    20
    T061190
    08/11/2016
    21
    #N/A
    22
    #N/A
    23
    #N/A
    24
    #N/A
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    D
    E
    11
    {=IFERROR(INDEX($B$2:$B$21,MATCH(0,COUNTIF($D$10:D10,IF(($G$8>=$A$2:$A$21)*($G$6<=$A$2:$A$21),$B$2:$B$21,$D$10)),0)),"")}
    =INDEX($A$2:$A$21,MATCH(D11,$B$2:$B$21,0))
    Sheet: Sheet1
    Last edited by AliGW; 11-11-2016 at 02:22 PM.

  7. #7
    Registered User
    Join Date
    04-26-2016
    Location
    Los Angeles, CA
    MS-Off Ver
    2010
    Posts
    13

    Re: Distinct List & Matching

    Brilliant! You've been such a great help. Thank you, Ali!!!!!!!!
    Last edited by AliGW; 11-11-2016 at 02:24 PM. Reason: Removed unnecessary quote to reduce clutter. :)

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Distinct List & Matching

    You are most welcome!

+ 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. Need Distinct List Returned
    By TRUCKING123 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-31-2016, 09:10 PM
  2. [SOLVED] Extract a unique distinct list by matching items that meet a criterion
    By PeterDavids in forum Excel General
    Replies: 10
    Last Post: 10-10-2015, 09:15 AM
  3. [SOLVED] Alter Matching Sub From matching two Ranges to matching one range and list
    By capson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2015, 10:48 PM
  4. List of distinct numbers withing range and another list extracted
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-16-2014, 03:27 PM
  5. Trying to average a distinct list
    By leftee96 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-07-2013, 04:36 PM
  6. Distinct List
    By jerry8989 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-27-2007, 11:21 PM
  7. Distinct list formula
    By summergs in forum Excel General
    Replies: 5
    Last Post: 08-16-2006, 01:15 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