I have a table and in one column I have various types of data that needs to be sorted.
Lets say I have:
1
3
2
bob
john
bob
greg
john
harry
greg
What I need is a way to custom sort the data so that it looks like this:
1
2
3
john
john
bob
bob
greg
greg
harry
So what I need is a custom sort that sorts first by number (smallest to largest), then by a second value, then by a third value, then by a fourth value, and then all remaining.
Of course these are example values, but the issue I am having is sorting the numbers, from small to large, and the text in the same column.
Any help would be appreciated!
I found the instructions below, but I can't figure out how to incorporate various numbers into this.
http://office.microsoft.com/en-us/access-help/sort-records-in-custom-order-HA010062658.aspx
1.Now, open the table in Datasheet view.
2.On the Home tab, in the Sort & Filter group, click Advanced and then click Advanced Filter/Sort on the shortcut menu.
3.Add the fields you want, such as FirstName, LastName, and Title, to the grid.
4.Right-click the Field row in the first blank column, click Zoom, and then type the following expression:
IIf([Title] = "Vice President, Sales", 1, IIf([Title] = "Sales Manager", 2, IIf([Title] = "Sales Representative", 3, IIf([Title] = "Inside Sales Coordinator", 4, 5))))
IIf([Title] = "Vice President, Sales", 100001, IIf([Title] = "Sales Manager", 100002, IIf([Title] = "Sales Representative", 100003, IIf([Title] = "Inside Sales Coordinator", 100004, VAL([Title])))))
where 100000 should be larger than your larger number.