+ Reply to Thread
Results 1 to 10 of 10

Extract all matching rows with "Active" from a database

  1. #1
    Registered User
    Join Date
    07-17-2009
    Location
    toronto, canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Extract all matching rows with "Active" from a database

    Heres what I need:

    On the 'values' worksheet (first one), a formula in cell M2 that will search the worksheet 'oc_users' (second one) for any row containing "Active" in column G, these rows will return the corresponding email address in column A of the same worksheet. Skipping "Inactive" rows.

    End result: anyone with an active status in oc_users will have their email populated in the 'values' worksheet.

    Thanks in advance to anyone who can help!

    help.xls

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Unsure of formula to use - VLOOKUP?

    Try this formula:

    Please Login or Register  to view this content.
    edit the ranges to suit your data and then confirm with CTRL+SHIFT+ENTER not just ENTER so that { } brackets appear, then copy down as far as you want.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-17-2009
    Location
    toronto, canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Extract all matching rows with "Active" from a database

    This formula works beautifully in my sample - thank you. When I try and apply it to my real workbook it returns a blank cell. I'm certain this is happening because the active / inactive column has a formula in it which populates it with either active or inactive - how can I adjust your formula to consider the value instead of the formula in column G?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract all matching rows with "Active" from a database

    It should still work, make sure, though that the formula result is not returning Active with an extra space or something to not make it an exact match.

  5. #5
    Registered User
    Join Date
    07-17-2009
    Location
    toronto, canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Extract all matching rows with "Active" from a database

    Double checked and the formula result value to return is "Active" or "Inactive" - no spaces. So nothing to add?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract all matching rows with "Active" from a database

    Show us your workbook? Or your formula and the ranges your are trying to work with.

    Also, you made sure to confirm with CTRL+SHIFT+ENTER to get the { } brackets?

  7. #7
    Registered User
    Join Date
    07-17-2009
    Location
    toronto, canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Extract all matching rows with "Active" from a database

    I would but it's 18.5Mb so that's too much to upload which is why I made a small version previously uploaded here. Put it this way, when I manually enter the word Inactive in ref cell the formula works - that's how I know it's not reading the value.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract all matching rows with "Active" from a database

    There has to be something wrong with the returned "Active" word from the formula as it should still work.

    Does this work?

    Please Login or Register  to view this content.
    confirmed with CSE key combination

  9. #9
    Registered User
    Join Date
    07-17-2009
    Location
    toronto, canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Extract all matching rows with "Active" from a database

    It works but I cant seem to copy the formula down the column properly for each row

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract all matching rows with "Active" from a database

    If that worked then you should first check that the formula that returned the string "Active" does not have "Active " or " Active" instead (ie. extra trailing or leading space) and fix that. The use the original formula.

    To copy the formula down, after first confirming it with the CSE key combination at the beginning, activate the cell with the formula, and click and drag down the little black square at bottom right corner of the cell.

+ 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