I'm sorry Lonkero, but I think you missed it.
I backed out your changes to the central loop as it was the same
length as mine, but used ('$a ') which I don't think is allowed.
You reduced the Sort UDF by 3 but missed your own trick,
namely setting the loop var to zero on a swap,
allowing me to remove the outer loop.
Golf score = 472
code:
FUNCTION anagram($J)
DIM $u, $,$a,$b,$c, $I,$O
$u = UBound($J)
$I = S($J)

FOR $ = 0 TO $u
DIM $t[20]
FOR $a = 1 TO Len($I[$])
$t[$a] = Substr($I[$],$a,1)
NEXT
$J[$] = Join(S($t),'')
NEXT

FOR EACH $a IN $J
DIM $,$d
FOR $c = 0 TO $u
IF $a = $J[$c] AND $a
$ = $ + ' ' + $I[$c]
$d = 1 + $d
$J[$c] = 0
ENDIF
NEXT
IF $d > 1
$O = $O +$b+ Chr($d)+$
$b = #
ENDIF
NEXT

$ = ''
IF $O
$ = S(Split($O,#))
FOR $a = 0 TO Ubound($)
$[$a] = Substr($[$a],3)
NEXT
ENDIF
$anagram = $
ENDFUNCTION
;
FUNCTION S($)
DIM $t
FOR $S = 1 TO UBound($)
$t = $[$S-1]
IF $[$S] < $t
$[$S-1] =$[$S] $[$S] =$t
$S = 0
ENDIF
NEXT
$S = $
ENDFUNCTION