Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Excel - how do I format negative Costs in Red

by toolic (Bishop)
on Feb 02, 2010 at 14:01 UTC ( [id://820945]=note: print w/replies, xml ) Need Help??


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

I don't have an answer to your question, but I have a couple tips that should save you a bit of typing in the future.
@al = qw (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z);
can be replaced by (see Range Operators):
@al = 'A' .. 'Z';
You could use the following to initialize your hash:
my %dp_numfmt = ( dp0 => "0", dp1 => "0.0", dp2 => "0.00", # etc. );

Replies are listed 'Best First'.
Re^2: Excel - how do I format negative Costs in Red
by Fletch (Bishop) on Feb 02, 2010 at 15:18 UTC

    If you're going for saving typing . . .

    my %dp_numfmt; $dp_numfmt{"dp$_"} = join( ".", "0", "0"x$_) for 0..5;

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      hmmm - but then I really would have to know what I was doing!
Re^2: Excel - how do I format negative Costs in Red
by merrymonk (Hermit) on Feb 02, 2010 at 14:37 UTC
    Thanks for those. I am alwyas 'up' for saving typing!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://820945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-05-29 05:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found