ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort isn't working correctly (https://www.excelbanter.com/excel-programming/452513-sort-isnt-working-correctly.html)

GARYWC

Sort isn't working correctly
 
The cells in col A and in col B contain the same data.
All cells have a "General" format.
Both columns are unsorted.

I highlight col A and use DATA/SORT/SORT BY COLUMN A/SORT ON VALUES/ORDER A to Z then click OK.

I highlight col B and use DATA/SORT/SORT BY COLUMN B/SORT ON VALUES/ORDER A to Z then click OK.

I expect the cells in both columns to be sorted in the same order but they aren't. Â*(For example: 2008-ITALY001.jpg is in A137 and in B61).

Why isn't sort working correctly?

Mike S[_5_]

Sort isn't working correctly
 
On 11/4/2016 10:28 PM, GARYWC wrote:
The cells in col A and in col B contain the same data.
All cells have a "General" format.
Both columns are unsorted.

I highlight col A and use DATA/SORT/SORT BY COLUMN A/SORT ON VALUES/ORDER A to Z then click OK.
I highlight col B and use DATA/SORT/SORT BY COLUMN B/SORT ON VALUES/ORDER A to Z then click OK.
I expect the cells in both columns to be sorted in the same order but they aren't. (For example: 2008-ITALY001.jpg is in A137 and in B61).
Why isn't sort working correctly?


Can you post the picture somewhere online and then provide a link to it?
Dropbox would work.

Just to be sure, did you run any code to verify that the data is exactly
the same in both columns, e.g.
http://www.techrepublic.com/blog/mic...of-excel-data/



GARYWC

Sort isn't working correctly
 
https://1drv.ms/f/s!AtYv9NwmLzr4dw6JzHm1n3joiBM


Grumpy Tech

Sort isn't working correctly
 
On 5/11/2016 4:57 PM, GARYWC wrote:
https://1drv.ms/f/s!AtYv9NwmLzr4dw6JzHm1n3joiBM

It's probably because the data is not the same in both columns. Column
'A' contains both the file name and the date and size etc whereas Column
'B' only contains the file name. Because of the extra data in column 'A'
it will sort differently.

GARYWC

Sort isn't working correctly
 
Cols A and B now contain only the filename. Here is the new file:

https://d.docs.live.net/9a32780eab1e6d22/bad-sort.xlsx

The sort still isn't working correctly.

GARYWC

Sort isn't working correctly
 
Cols A and B now contain only the filename. Here is the new file:

https://1drv.ms/x/s!AiJtHqsOeDKab4uQi4gvqTjjy_8

The sort still isn't working correctly.




GARYWC

Sort isn't working correctly
 
Note: The columns in the new file are NOT sorted. You can sort them and see how they get sorted.

GARYWC

Sort isn't working correctly
 
Solved!


Mike S[_5_]

Sort isn't working correctly
 
On 11/5/2016 12:40 PM, GARYWC wrote:
Solved!


How, exactly?

GARYWC

Sort isn't working correctly
 
When extracting the data with EXIFTOOL, I used the -csv parameter to output a comma-separated values (CSV) file. I then opened the CSV file in Excel and ticked "Delimited" and unticked the "tab" delimiter and ticked the "comma" delimiter. Apparently, that "corrupted" the filenames so Excel couldn't sort the data correctly.

I re-extracted the data with EXIFTOOL with the -csv parameter. When I opened the CSV file, I ticked "Delimited" and left the "tab" delimiter ticked. This time, the filenames did not become corrupted and Excel sorted the data correctly.

GARYWC

Sort isn't working correctly
 
I specified that the extracted data be output to a comma-separated values (CSV) file. In Excel, I opened the CSV file by ticking "Delimited", unticking the "tab" delimiter and ticking the "comma" delimiter. Â*Apparently, that "corrupted" the filenames so Excel couldn't sort the data correctly.

I re-extracted the data by specifying the data be output to a comma-separated values (CSV) file. In Excel, I opened the CSV file by again ticking "Delimited" but leaving the "tab" delimiter ticked. Â*This time, the filenames did not become corrupted and Excel sorted the data correctly.

Mike S[_5_]

Sort isn't working correctly
 
On 11/5/2016 10:44 PM, GARYWC wrote:
I specified that the extracted data be output to a comma-separated values (CSV) file. In Excel, I opened the CSV file by ticking "Delimited", unticking the "tab" delimiter and ticking the "comma" delimiter. Apparently, that "corrupted" the filenames so Excel couldn't sort the data correctly.

I re-extracted the data by specifying the data be output to a comma-separated values (CSV) file. In Excel, I opened the CSV file by again ticking "Delimited" but leaving the "tab" delimiter ticked. This time, the filenames did not become corrupted and Excel sorted the data correctly.


Thanks, glad you sorted it.




All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com