p.s. if you really really want to use your existing code, then look into using the split() function in conjunction with the @ separator. i.e. split(var, '@')[2]
you still need to use two summaries in the crosstab in order for this to work though. first summary splits the var with [1] and the second summary gets the [2] of the split.
however, you may also need to add extra coding checking the ubound() of the split first. again, using two sets of formulas with the second summary is easier.