+ Reply to Thread
Results 1 to 10 of 10

Generate Unique List Meeting Criteria

  1. #1
    Registered User
    Join Date
    08-16-2011
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    27

    Generate Unique List Meeting Criteria

    Hi,

    I have 2 columns of data in one sheet that list dates (say Master Dates) and transactions (say Master Transactions).

    In another sheet i would like a formula that can choose the correct transactions that fall between certain dates (call Date Beginning and Date End) and generate a list.

    i have tried this array:

    If((Master Dates>=Date Beginning)*(Master Dates<Date End),Master Transactions,"")

    Problem with this is when used in different columns for different date ranges there are large gaps in the generated list...

    I hope this makes sense to someone!

    Thanks in advance.

    Todd

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Generate Unique List Meeting Criteria

    Not sure without seeing your sample workbook, try to upload it at the forum....

    Cheers

  3. #3
    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
    53,048

    Re: Generate Unique List Meeting Criteria

    A2:A100 = date range
    C1=start date
    D1=End Date

    Maybe use a helper column (C?) with =countifs(date-range,">="&start date,date-range,"<="&end-date)

    =countifs($A$2:A2,">="$C$1,$A$2:A2,"<="$D$1) copied down

    Then to pull in your data, use INDEX/MATCH, with INDEX being the column (or range) you want to pull in, and match...=MATCH(A1,C2:C100,1)) copied down
    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

  4. #4
    Registered User
    Join Date
    08-16-2011
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    27

    Re: Generate Unique List Meeting Criteria

    Thanks for your responses. I attach an example.

    I would like to automatically generate the green shaded lists near the bottom.

    Please ignore that the dates dont match the payee description. I had to make random dates for this example! Also please dont laugh at my expense(s) hah.

    Todd
    Attached Files Attached Files

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Generate Unique List Meeting Criteria

    Maybe something like this? please check the file
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-16-2011
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    27

    Re: Generate Unique List Meeting Criteria

    Precisely something like that. Youre a genius!!

    Could you please explain what the formula does bit by bit so i can learn and understand :D thank you!

  7. #7
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Generate Unique List Meeting Criteria

    Im using date criteria as criteria which the data fall in the date range in (sorry for ";" sign because my system in Indonesia using that sign):

    (('Bank Dump'!$A$2:$A$29>=$E$2)*('Bank Dump'!$A$2:$A$29<$I$2), that will populate TRUE OR FALSE as a result, and I need TRUE results.

    IF(('Bank Dump'!$A$2:$A$29>=$E$2)*('Bank Dump'!$A$2:$A$29<$I$2);ROW('Bank Dump'!B$2:B$29)-MIN(ROW('Bank Dump'!B$2))+1)

    is populate row numbers that meet the criteria

    SMALL(IF(('Bank Dump'!$A$2:$A$29>=$E$2)*('Bank Dump'!$A$2:$A$29<$I$2);ROW('Bank Dump'!B$2:B$29)-MIN(ROW('Bank Dump'!B$2))+1);ROWS($A$1:A1))

    is return the smallest k-th smallest row number

    and then combine with INDEX function to return value in range...

    Sorry I am bad in explanation....

    Regards

  8. #8
    Registered User
    Join Date
    08-16-2011
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2003 and 2010
    Posts
    27

    Re: Generate Unique List Meeting Criteria

    Wow.

    I kind of get it. Thanks for explaining

  9. #9
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Generate Unique List Meeting Criteria

    You're welcome, thanks for the nicefeedback.....

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Generate Unique List Meeting Criteria

    Quote Originally Posted by azumi View Post
    IF(('Bank Dump'!$A$2:$A$29>=$E$2)*('Bank Dump'!$A$2:$A$29<$I$2);ROW('Bank Dump'!B$2:B$29)-MIN(ROW('Bank Dump'!B$2))+1)
    Why MIN(ROW('Bank Dump'!B$2)), why not ROW('Bank Dump'!B$2)?
    ROW('Bank Dump'!B$2) will always return 2, so what is the use of MIN to find MIN of a single number?

    Please make me correct if I am wrong.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. Replies: 8
    Last Post: 01-30-2013, 02:58 PM
  2. Replies: 5
    Last Post: 04-20-2012, 09:47 AM
  3. Counting unique column entries while also meeting other criteria
    By Mom2a* in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-04-2012, 05:21 AM
  4. Replies: 2
    Last Post: 03-30-2011, 08:05 PM
  5. Frequency of unique values meeting multiple criteria
    By systemsteve in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-30-2008, 09:50 AM

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