in reply to repeat excel formula
should be'=B'.$line_count - 'B'.($line_count_plus_1)
or'=B'.$line_count .' - B'.($line_count_plus_1)
Your minus sign is outside your quotes - you're subtracting in Perl, not Excel. This would have gotten caught if were using warnings. See Use strict warnings and diagnostics or die."=B$line_count - B$line_count_plus_1"
I'd probably use sprintf instead of creating a one-off variable:
sprintf '=B%d - B%d', $line_count, $line_count-1
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: repeat excel formula
by mark4444az (Sexton) on May 22, 2014 at 17:25 UTC |