+ Reply to Thread
Results 1 to 3 of 3

sorting rows based on a cell value that falls between a min and max value

  1. #1
    Registered User
    Join Date
    02-10-2020
    Location
    Cheshire, England
    MS-Off Ver
    365
    Posts
    7

    sorting rows based on a cell value that falls between a min and max value

    Hi
    I am looking for a solution for a specific problem relating to 2D coordinate values that define the profile of a tunnel extracted from a point cloud. The values are column A =the X coordinate and column B= the Z coordinate, column C is a specific code relating to the coordinate and its position. The problem I have is that the data needs to be in a specific order.
    I have created a series of formula/macros that get me nearly were I want to be but it doesn’t always work (for various reason during the export of the data) and some of the data ends up out of order which I then have to manually edit each sheet in a workbook to ensure the correct order. This wouldn’t be an issue if there were only a few but sometimes I can have a few hundred sheets at a time to sort. Almost always the coordinates that are out of order are the ones that need to be at the top of the sheet. I believe I am at the limit of my Excel capability with this one and would appreciate any guidance.

    I have attached a sample sheet.

    I need row 1 to contain the value 0,0 (this is the datum) to be at the top and in column C the code would be 3.

    I need row 2, (column A) to contain the data that has values between 1.425 and 1.445 along with the associated data in column B, this will then have a code of 4 in column C.

    In Row 3, (column A) needs to contain the data that has the values between 3 and 4, along with the associated data in column B, and the code in column C would be 4.

    In Row 4, (column A) needs to contain the data that has values between 4.2 and 5, along with the associated data in column B, and the code in column C would be 3.

    In the attached sheet I have ensured that the required values are in the top rows, hopefully this should help but realty for some reason they are more likely to be scattered towards the bottom, but I am assuming that it doesn’t matter were they are.
    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,219

    Re: sorting rows based on a cell value that falls between a min and max value

    Not sure this is what you're after, but for values from A and C in row 2, try this array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Depending on your Excel version, you might have to confirm with Ctrl+Shift+Enter instead of just Enter.
    Then copy to next cell on right column.
    Change min & max values for next rows.

    Good luck!

  3. #3
    Registered User
    Join Date
    02-10-2020
    Location
    Cheshire, England
    MS-Off Ver
    365
    Posts
    7

    Re: sorting rows based on a cell value that falls between a min and max value

    Many Thanks

    Will try it out later.

    Tim

+ 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] sorting entire rows based on the value of one cell
    By usbrunsbr in forum Excel General
    Replies: 6
    Last Post: 10-11-2018, 06:18 AM
  2. Replies: 4
    Last Post: 09-12-2013, 11:32 PM
  3. [SOLVED] Scan a series of rows in sequence and identify cell where value falls below previous max?
    By hadamhiram in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2013, 03:31 AM
  4. [SOLVED] Populate Cell Based on Where Number Falls into Range
    By BHR in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2012, 07:29 PM
  5. If statement based on cell data, if falls in range.
    By finch82 in forum Excel General
    Replies: 3
    Last Post: 10-27-2011, 04:11 PM
  6. Sorting and Delete rows meeting criteria based on sorting criteria
    By ron2k_1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2011, 02:40 PM
  7. Sorting sets of rows based on cell
    By mpkavanagh in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-17-2011, 11:35 AM

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