+ Reply to Thread
Results 1 to 3 of 3

Filtering blank rows from a column

  1. #1
    Registered User
    Join Date
    01-28-2007
    Posts
    2

    Filtering blank rows from a column

    I've got a "raw data" sheet that I would like to condense into something a little easier to read on a different sheet. Let me try to explain:

    Columns A,B,C, & D may be up to 200 rows long but some cells are empty. Row 1 has data but then 2 & 3 are empty. 4 has data but 5,6,& 7 are empty...

    Column D has a qualifier (such as "active" or "inactive") that tells if the entire row is needed.

    Is there anyway to use VLOOKUP on the word active to copy the rows to a new sheet BUT exclude the blank rows? My goal is to condense the columns excluding any blank rows. I know about auto-filtering but I want this to be an automatic deal so that I can just paste my data in sheet one and then goto sheet 2 and its all there nice and pretty...

    Thanks, any help would be greatly appreciated.
    Jeff
    Last edited by IB4OU; 01-29-2007 at 12:01 AM.

  2. #2
    Forum Contributor
    Join Date
    01-24-2007
    Location
    Southampton, UK
    Posts
    137
    I note you've already investigated filtering.

    You could look into setting up a data query on the 2nd worksheet that references the raw data on the first one, and by using filtering in the query (using the WHERE condition) the 2nd sheet should then automatically show the filtered data.

    See menus Data, Import External Data, New Database Query.

    You will have to point the data query to the range in the 1st sheet, and this should have field names in the columns and be covered by a named range. The data and file must be saved before setting up the data query.

    As you will be pasting in new raw data from time to time (presumably with different number of rows) you should define the named range to extend far beyond the likely number of rows (the data query will filter out anything that's blank anyway).

    After pasting in a new set of raw data, save the file, then go to the 2nd sheet and right-click on the filtered data and select Refresh Data from the pop up menu.


    This should work ok, but I have found that data queries fail when workbooks are moved, emailed, or renamed (when a bit of VBA code may be needed to ensure the data query always finds the correct data source).

  3. #3
    Registered User
    Join Date
    01-28-2007
    Posts
    2
    Thank you Loz, that's excellent information.

    Thanks again!

+ 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