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.
Bookmarks