Custom Sort

H

Hacknwhack

Hi all,

I have a unique sort that cannot be accomplished using the sort function due
to some very odd criteria.
Basically I need to test a particular field and when it is equal to various
values, I need to move it.
My intention is to use a case statement to test for the right criteria,
however I am uncertain as to how to move it, once identified and how to get
to my insertion point.

This particular example has me sorting one of the user text fields into the
following order:
101
102
103
104
100
201
202
203
204
200

As you can see the standard sort won't work, so I will test for 100, 200 and
them move them to the appropriate location.
Any help would be greatly appreciated....

-hack
 
J

Jan De Messemaeker

Hi,

I'd rather change the items and use a regular sort
Customize a number field (or write VBA logic) such that if the last digit is
a zero you add 9, else you subtract 1.
Then just sort.

Just a thought.
 
H

Hacknwhack

Pure Genius.....
thanks a bunch this is certainly easier then what I was attempting and as
these fields are not visible, its perfect

-hack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top