Results 1 to 4 of 4

Sorting gives unexpected results

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Sorting gives unexpected results

    I am trying to sort an excel worksheet using three levels. The sort failed in several respects.
    • It changed data in a record (one row). The row in which a record’s data is changed appears to be random as does the value that is chosen.
    • It produced #N/A and ### errors in select records
    So I sorted the same worksheet on only one level. I got the same type of error.

    Information that might help someone help me overcome this unexpected outcome Is:
    • Data being sorted is composed of x records.
    • The data in each record got there by three methods. All three methods were completed
    Before any sorting was applied.
    o Three Data creation methods
    o Manual method: I manually entered data into a cell.
    o code in a cell extracts data from another worksheet and enters
    That extracted data in the cell of the worksheet i will be trying to sort.
    o code in a cell that calculates a value based upon a value in a record
    And places it in the cell of the worksheet I will be trying to sort.
    • The error is occurring ONLY in cells that have code in them. Either code that extracts from another worksheet or code that operated on a cell in a single record. That suggests that the
    Sort routine does not see the data in the worksheet that is being sorted but sees the formulas that created the data in the worksheet. If that is true, how do I tell the excel sort function
    (Data->sort) that I want it to operate on the data in the cell and not any formula in that cell that was used to create the data?
    • I do see a way out of this dilemmas, which is to calculate the values in another worksheet And then point to the data on the other sheet.

    I included the workbook (Outlets and Switches). The worksheets of interest are (1) Actual Circuit Breaker Layout 4 16 jul 2024 0954 and (2) Wire Numbers and Panel Position. The last worksheet is referenced in code within a column found in the Layout 4 worksheet.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA producing unexpected results
    By trandle in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-20-2017, 09:43 AM
  2. [SOLVED] range.value = var ...unexpected results.
    By excel_joe in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-22-2016, 02:59 PM
  3. Unexpected results in sorting macro
    By kcorless in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2015, 01:43 PM
  4. [SOLVED] Unexpected results from MSQuery
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2014, 11:09 AM
  5. Unexpected results from CurrentRegion
    By ajgully in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-29-2011, 02:55 PM
  6. Unexpected HLOOKUP results
    By scaffdog845 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2009, 03:01 PM
  7. Unexpected Results with CurrentRegion
    By avveerkar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2007, 09:57 PM

Tags for this Thread

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