Hi all,

I have what seems like an incredibly simple problem, but I can't figure out what is going on here.

I export data from Salesforce, save it as a .xlsx file, open it up and create a quick logical test. I run emails I downloaded against a list of emails from another tab in the excel file, returning the email if the email matches and a 1 if not (I am using IFERROR(VLOOKUP(...),1) as my formula). I would expect that I could sort that the sheet by that field to group all of the individuals whose email showed. Excel tries to sort the list but does not do so effectively. It moves some rows but does not order them based on what I sorted them for. Most rows are untouched.

Initially I assumed this was just a problem sorting alpha and numeric data together so I wrote a simple if statement to return a 1 if the email was absent and a 2 if the email was present. Still, the sorting fails to rearrange much of the data. I then copied all the data to a new sheet, keeping only the values. I then tried sorting by the same columns. Here the columns sort, but the only data that is moved is in the column I am sorting by! It doesn't move any other data! Ie if I am sorting from least to greatest

Joe 2
Mary 1

Will become:

Joe 1
Mary 2

When I sort. I have no merged or empty cells so I am at a bit of a loss for what could be causing Excel to screw this up. Any help would be greatly appreciated.