in reply to Create a excel sheet with formula ???
If I understood your question correctly, I am answering your second question.
Change your formula code as shown below. Here the variables working perfectly in the formula.
Also try to use strict and warnings.my $first = 'C2'; my $second = 'C9'; for my $r (3..4) { $worksheet->write("E$r", "=COUNTIF($first:$second, \"pass\")"); $r++; $worksheet->write("E$r", "=COUNTIF($first:$second, \"FAIL\")"); + }
Prasad
In Section
Seekers of Perl Wisdom