+ Reply to Thread
Results 1 to 10 of 10

Automatically and continuously removing blanks in data range

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Automatically and continuously removing blanks in data range

    Hello i have a data range of two coloums and which are checking against another set of two col's with the same set of data to see if it fits between a range of numbers.
    As not all of them meet the crieteria i end up having a list with lots of blanks in them. As i have to do this for 50 seperate sheets is there a way to make it automatically delete all the blanks within a set of cells. So that it automatically moves everything to the top. problem is this data is always changing so the c and d cols might have 30 vals in now but could have 50. and i need all the data that matches to move up to the top of H and I so i can gather more info on them from an external source.

    Hope this make sense

    tester book.xls

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Automatically and continuously removing blanks in data range

    The try sorting the data, blanks will go to the end

    Please Login or Register  to view this content.
    Please take time to read the forum rules

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Automatically and continuously removing blanks in data range

    Hi just to confirm this will just reorder the data in the coloums so the blank ones go to the end ? will it still pair up B & C? for example C4 and B4 will still be side by side? Also how would i fit this in with the if statement already in there e.g. = =IF(AND($D20 >= $C$2, $D20 <= $D$2), $D20, "")

  4. #4
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Automatically and continuously removing blanks in data range

    It will fit nice, though right now it will only sort column a and b.
    How many columns is there?

  5. #5
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Automatically and continuously removing blanks in data range

    At the Moment i only have two columns that need sorting which are H and I and they need to be sorted between I5:I60 & J5:j60 however I5 &j5 must always be next to each other if this makes sense. As the data that each of the cells in I and J is pulling comes from BC and if they dont match up my data gather from another program doesnt work as it needs both pieces of information to work.

  6. #6
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Automatically and continuously removing blanks in data range

    The sort method wont work with the current datastructure.

    Whats the purpose of the workbook? Just thinking there might be a better way of structuring the workbook.

  7. #7
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Automatically and continuously removing blanks in data range

    Hmm can't really give away the exact details but its basically like this:
    Assume Col C: names of people Col D: there age (this is being imported so its always changed might be more names added etc) Col E = the number of people with the same birthday - this is being done with an importation formula for all 3 cols
    i want to find people with ages that are greater then x and less then Y. And only display those who meet the criteria, however if the list updates and more people with the correct criteria are added they should be added to the list too. I then need to take an average of the volume of people with the same birthday.

    If this isn't possible. I'd like to create a seperate list next to the list of Birthdays and names, of the peoples names and birthdays of those who meet the age range. Then from here i can get the volumes for only these people and then compute the average.

    Hope this makes sense.

  8. #8
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Automatically and continuously removing blanks in data range

    What is the criterie, you can build this into the formula and in this way eliminate the need for duplicate data

  9. #9
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Automatically and continuously removing blanks in data range

    At the moment its
    =IF(AND($D26 >= $C$2, $D26 <= $D$2), $D26, "") So C2 is the lowest level and D2 is the highest these are dynamic and update based on the figures in it.

  10. #10
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Automatically and continuously removing blanks in data range

    Hi,

    Try looking at this workbook.
    I have removed the formulas in columns H and I and added an event.
    Every time a value is changed, added or removed from columns C and D it checks if it falls between the criteria if i does i copies it to Columns H and I.

    Try and play around with it, changing values and adding new data and see if it behaves the way you want.
    Attached Files Attached Files

+ 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