Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2017, 09:15 AM
ethanstrauss ethanstrauss is offline Sort &  lookup with long strings Windows 7 64bit Sort &  lookup with long strings Office 2013
Novice
Sort &  lookup with long strings
 
Join Date: Jun 2017
Posts: 2
ethanstrauss is on a distinguished road
Default Sort & lookup with long strings


Hi,
When performing sorts and lookups (vlookup etc) Excel 2013 seems to only consider the first 255 characters of long strings. The real problem is that it does the sort incorrectly and does not give any warning! It does do equality comparisons correctly.
This is a problem for me because I manipulate DNA & protein sequences in Excel and it is common for the first 255 characters to be the same, but then for sequences to diverge.
I don't have a real problem with Excel not doing this sort correctly, it really isn't designed for this sort of use, but I do have a problem with not giving a warning as it is giving objectively incorrect results!
Ethan
Reply With Quote
  #2  
Old 06-29-2017, 10:45 AM
NBVC's Avatar
NBVC NBVC is offline Sort &  lookup with long strings Windows 10 Sort &  lookup with long strings Office 2013
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

Perhaps, as a workaround, you can create separate columns that split the strings using LEFT() and MID() functions, then you can sort by first column (left 255 chars) and then second column (remaining chars)?
Reply With Quote
  #3  
Old 07-03-2017, 07:58 AM
ethanstrauss ethanstrauss is offline Sort &  lookup with long strings Windows 7 64bit Sort &  lookup with long strings Office 2013
Novice
Sort &  lookup with long strings
 
Join Date: Jun 2017
Posts: 2
ethanstrauss is on a distinguished road
Default

Thanks,
That would certainly work. What I actually did was to write my own program to deal with situation. The thing I really take issue with is not that Excel gave me incorrect results in a way that was not at all obvious. At first I came to incorrect conclusions about my data and then it took me several hours to figure out what was going on.
It would be good if Microsoft put in a warning if any of the relevant functions are applied to strings longer than 255.
Ethan
Reply With Quote
Reply

Tags
lookup, sort, string comparison



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort &  lookup with long strings How to Dim a substring between two strings dwirony Word VBA 4 10-28-2016 07:51 AM
VBA code to extract strings twozedz Excel Programming 1 05-15-2016 06:00 AM
LOOKUP - Complex lookup with 2 lookups in 1 cell sglandon Excel 6 05-05-2016 09:44 AM
Sort &  lookup with long strings Sort strings by number of characters reneforster Word VBA 1 12-04-2014 07:25 AM
Sort &  lookup with long strings update style of all strings available between two specific strings vikrantkale Word 1 03-28-2011 06:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft