Hi
just a very minor addition for sqapg. Prob best not to use the IIF function and to replace with IF. Dont know if it still does but i remember that IIF caused probs in earlier VB versions and also required adding an extra reference.
Regards
Stuart