Question 6: A Perl solution
sub solve { local($_) = @_; s{\A\s+}{}; s{\s+\z}{}; my $cell_ref = '\b[A-Z][0-9]{1,3}\b'; if(m{\A($cell_ref)\s*[+]\s*($cell_ref)\z}) { return cell_value($1) + cell_value($2); } else { die "Don't know how to solve: '$_'\n"; } }