+ Reply to Thread
Results 1 to 4 of 4

How to exclude data in table?

  1. #1
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    How to exclude data in table?

    Hi there I have 2 tables with account numbers.

    1st table is named 30 dy ltr & the second is AFS Bankrupt Loans(3).

    the 1st table picks up accounts that are 30 days past due, the 2nd one picks up all loans that are in bankruptcy. Sometimes I get accounts that are 30 days past due & that same account is in the bankruptcy table. I would like to exclude that loan from my query.

    I have no idea how to start on this... any ideas???
    Last edited by jgomez; 12-06-2011 at 02:04 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,929

    Re: How to exclude data in table?

    Create a query joining the two tables on the account numbers. In an expression create an IIF statement that says soemthing like this: IIF([BankruptcyField]="yes" and [PastDueField]="yes", "Exclude","Include"). In your criteria for this new field put ="Include." It is difficult to give you something more exact without knowing your exact table layouts, but this should give you a good idea of how to achieve this.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: How to exclude data in table?

    Alan's method will certainly do the trick. I'm wondering what kind of join you are using. If you are using an inner join, you should only get each account number once, provided there is only one account in each table. Can you provide your SQL statement?
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  4. #4
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    Re: How to exclude data in table?

    I do get the account only once but I shoudn't get it period... Alan I can't thank you enough for showing me this... it worked.

+ 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