+ Reply to Thread
Results 1 to 2 of 2

Deleting Values Outside of a Range in Two Columns

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    39

    Deleting Values Outside of a Range in Two Columns

    I was wondering if anyone might know of a simple way to delete values outside of a range in excel. Here's my situation...

    I download point files to create topography in AutoCAD. The files are text files that contain 3 comma separated columns. These columns are Northing, Easting and Elevation, and these three values designate a point on the ground. The files are downloaded from a site online and contain hundreds of thousands of point each, with each file covering 600 acres on the ground. Obviously, this makes for a VERY large surface (topography), and many times I just need a few acre's worth of topo data.

    Traditionally, I'll go into a drawing, look at a point to the upper left of my project, write down the northing and easting, then go to the bottom right of my project and do the same. Thus, I'll have a value of say 1086342, 587945 for the upper left, and 1089421, 581125 for the lower right. I need to delete *ALL* of the points in the excel file that are not in the range of 1086342 through 1089421 in the first column ***AND*** 581125 through 587945 in the second column. Right now I sort the first row, then select all rows above and below the range specified. I then sort by the second row and do the same thing. Once that's done, I save the file. It would be terrific if I could use an algorithm where I submit these four numbers and it's done automatically. I have a decent amount of experience with VBA, but I think this is above my skill level. Any help would be appreciated!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Deleting Values Outside of a Range in Two Columns

    Not something I'm familiar with but I'd have thought you could use AutoFilter with two conditions on each column. You might need to copy and paste the stuff you want to another worksheet.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Deleting Columns based on Cell Values VBA
    By Matty5894 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2014, 08:58 AM
  2. Macro: Deleting a range of specified columns
    By mbus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2013, 09:58 PM
  3. Concatenate values from columns and deleting duplicates
    By RandomP in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2011, 06:20 PM
  4. Deleting a range of cells (rows and columns)
    By ketspatel in forum Excel General
    Replies: 5
    Last Post: 04-05-2011, 11:45 AM
  5. Deleting range of multiple columns
    By Samba1 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-29-2010, 08:10 PM
  6. Comparing Columns and Deleting values
    By oneblueaugust in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-06-2007, 02:43 PM
  7. Deleting row unless certain values in certain columns
    By Kris in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2006, 12:55 PM

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