+ Reply to Thread
Results 1 to 4 of 4

Get data based on multiple conditions

  1. #1
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Get data based on multiple conditions

    Hi,

    See attached file.

    My table has a 'Name', 'Start Date', 'End Date' and 'Nr of Days' columns. I need to get the data of the records found that matches the condtions shown on the file.

    In this example, the number of records found is 3. What is the best way get tha data from this 3 records?

    Regards,
    Elio Fernandes
    Last edited by efernandes67; 12-31-2010 at 10:52 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Get data based on multiple conditions

    You can use COUNTIFS given use of XL2007

    Please Login or Register  to view this content.
    change , to ; per your locale requirements - unknown

  3. #3
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Get data based on multiple conditions

    Hi,

    I think I didn't explain to well.

    I know how to count the number of records that match the conditions. You can see that in formula of
    cell I7.

    What I need is a way to retrieve all the data (Name, sDate, eDate, nDays) of the records that match the conditions..

    Regrads,
    Elio Fernandes

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Get data based on multiple conditions

    Regards the formula - understood though note that the COUNTIFS suggestion is significantly more efficient than the Array you were using.

    If you need only to conduct one set of tests against your source data at any given time then you would be best served using formulae to generate the "x" denotations you have in your sample and in turn using this new denotation field as the Report Filter in a Pivot Table so as to retrieve the data, eg:

    Please Login or Register  to view this content.
    You can then create a Pivot off your Table object and use the above column as Report Filter (set to "x").
    As and when you alter I3:I5 you would Refresh the Pivot to see updated data
    Using formulae to generate the sub list though possible (and without too much difficulty) would IMO be reinventing the wheel to a certain extent.
    Last edited by DonkeyOte; 12-31-2010 at 10:38 AM.

+ 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