in reply to Excel - how do I format negative Costs in Red

It's too late at night to go through all your code, but you need something like:
$rng = your range; $rng->{NumberFormat} = "#,##0.00_);[Red] (#,##0.00)"
An Excel format has four parts. I have never needed to know what the fourth does. The first is for positive numbers, the second for negative and the third for zeros. If missing, they default to the format for positive numbers. The string I have given you is one I use frequently, and a variant on my standard format. The underscore after the last zero of part 1 means "leave enough space after the number for the character that follows the underscore". [Red] does what I think you want, but note the space following it. It's critical.

Note also that if you want this as a format for everything rather than a few cells, you are better off using styles.

Regards,

John Davies

P.S. Is this the point at which I suggest a new section in PerlMonks for Excel posts? Everyone else seems to have been suggesting new sections recently. :-)